Bug 1190299

Summary: 'dnf install' thinks foo-1.0-1.fc22 == foo-1.0-1.1.fc22
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: akozumpl, jsilhan, mluscon, packaging-team-maint, pnemade, rholy, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-07 07:00:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adam Williamson 2015-02-06 23:28:07 UTC
It seems that 'dnf install' doesn't understand release fields like '1.1'?!

I have a habit of bumping the package release by 0.1 when doing a private test build - this is to ensure the next 'official' build supersedes it, so I don't wind up with my test 'foo-1.0-2.fc22' installed instead of the real one from the packager. So I build 'foo-1.0-1.1.fc22'.

dnf seems to think packages with the same NEV and R as '1' and '1.1' are the same! yum certainly doesn't. See below, for:

fedfind-1.0.1-1.fc22.noarch
fedfind-1.0.1-1.1.fc22.noarch.rpm

[adamw@adam SPECS]$ rpm -q dnf
dnf-0.6.3-3.fc22.noarch
[adamw@adam SPECS]$ sudo dnf install ../RPMS/noarch/fedfind-1.0.1-1.1.fc22.noarch.rpm 
[sudo] password for adamw: 
firmware for qemu, built by jenkins, fresh from git repos                        11 kB/s |  13 kB     00:01    
wikitcms repository                                                              49 kB/s | 2.9 kB     00:00    
Private side repo                                                               1.3 MB/s | 2.2 kB     00:00    
Package fedfind-1.0.1-1.fc22.noarch is already installed, skipping.
Error: Nothing to do.
[adamw@adam SPECS]$ sudo yum install ../RPMS/noarch/fedfind-1.0.1-1.1.fc22.noarch.rpm 
Loaded plugins: auto-update-debuginfo, langpacks
Examining ../RPMS/noarch/fedfind-1.0.1-1.1.fc22.noarch.rpm: fedfind-1.0.1-1.1.fc22.noarch
Marking ../RPMS/noarch/fedfind-1.0.1-1.1.fc22.noarch.rpm as an update to fedfind-1.0.1-1.fc22.noarch
Resolving Dependencies
--> Running transaction check
---> Package fedfind.noarch 0:1.0.1-1.fc22 will be updated
---> Package fedfind.noarch 0:1.0.1-1.1.fc22 will be an update

Comment 1 Parag Nemade 2015-02-07 06:30:49 UTC
I think its valid. If you have any package already installed then every future update should use "dnf update" command. With yum it is possible to say "yum install" for already installed package. I think this is yum vs dnf difference.

http://dnf.readthedocs.org/en/latest/cli_vs_yum.html#install-command-does-installation-only

Comment 2 Adam Williamson 2015-02-07 07:00:41 UTC
oh, right. I prefer yum's behaviour there because you can run 'yum install *.rpm' on a bunch of packages and it will install ones that aren't installed and update ones that are, but it is documented...

Comment 3 Radek Holy 2015-02-09 09:00:05 UTC
Hello, thank you for the report.
Actually, we've changed our opinion on this. DNF will update the package as well as YUM as soon as I fix it.

*** This bug has been marked as a duplicate of bug 1138700 ***

Comment 4 Radek Holy 2015-02-09 14:32:28 UTC

*** This bug has been marked as a duplicate of bug 1160950 ***