Bug 1255087 - "dnf install foo" does not install the latest installonly version if an older version is installed
"dnf install foo" does not install the latest installonly version if an older...
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2015-08-19 10:56 EDT by Dennis Gilmore
Modified: 2016-07-19 18:02 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-19 13:34:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dennis Gilmore 2015-08-19 10:56:56 EDT
Description of problem:

[root@cubietruck01 ~]# yum --enablerepo updates-testing install kernel-lpae
Yum command has been deprecated, redirecting to '/usr/bin/dnf --enablerepo updates-testing install kernel-lpae'.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run:
'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'

Fedora 22 - armhfp                                                                                                                                                                                                                             2.0 MB/s |  37 MB     00:18    
Fedora 22 - armhfp - Test Updates                                                                                                                                                                                                              494 kB/s | 3.0 MB     00:06    
Fedora 22 - armhfp - Updates                                                                                                                                                                                                                   1.0 MB/s |  12 MB     00:12    
Last metadata expiration check performed 0:00:45 ago on Wed Aug 19 09:49:48 2015.
Package kernel-lpae-4.1.4-200.fc22.armv7hl is already installed, skipping.
Dependencies resolved.
 Package                                                                Arch                                                       Version                                                            Repository                                                          Size
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
 kernel-lpae                                                            armv7hl                                                    4.1.6-200.fc22                                                     updates-testing                                                     68 k
 kernel-lpae-core                                                       armv7hl                                                    4.1.6-200.fc22                                                     updates-testing                                                     15 M
 kernel-lpae-modules                                                    armv7hl                                                    4.1.6-200.fc22                                                     updates-testing                                                     10 M

Transaction Summary

Nothing to do.

dnf should have installed the kernel from updates-testing that I asked it to
Comment 1 Radek Holy 2015-08-19 11:20:05 EDT
This is not specific to kernels. "dnf install foo" does not upgrade "foo". Where did you get the impression that it should?

Another issue is that "Skipping packages with conflicts:" section which shouldn't be printed in this case IMO.
Comment 2 Dennis Gilmore 2015-08-20 09:15:07 EDT
considering you do not update but install kernels, and yum has always done the behaviour I expected I expect dnf to have the same behaviour.
Comment 3 Radek Holy 2015-08-20 09:38:07 EDT
OK, so, one step would be to resolve the bug 1255088 (kernel-lpae is not installonly).

But even then, DNF would not install the latest version of kernel-lpae if any kernel-lpae is installed already. You would need to use "dnf upgrade kernel-lpae" or "dnf install kernel-lpae-4.1.6-200.fc22".

Do I understand correctly that this way, you are requesting to change it?
Comment 4 Dennis Gilmore 2015-08-20 11:25:55 EDT
dnf shoudl always update if you say install, that is the behaviour that yum has, it is what is expected out in the world. but in the kernel case especially you have to use "rpm -i" if you use rpm on the cli to not have all other kernels removed. supporting the same option in the system managemnet tools is a must.  there is also bug#1225078 to fix that I hit again today.
Comment 5 Radek Holy 2015-08-31 10:13:42 EDT
Well, using "rpm -i", you need to specify the particular package instance. That works the same with DNF.

Anyway, this is an intentional difference between DNF and YUM. Since there are multiple ways how to install the latest version and since it does not conflict with our documentation, we are not going to change this.
Comment 6 Dennis Gilmore 2015-09-01 22:21:28 EDT
I strongly believe that the behaviour needs to be changed, your desire to make this different to yum will not change muscle memory.  many sysadmins will be taken by surprise and waste a lot of time figuring out why their package does not get updated.
Comment 7 Michal Luscon 2015-09-07 07:00:34 EDT
Ok, we will keep this open for tracking user demand.
Comment 8 Fedora Admin XMLRPC Client 2016-07-08 05:32:28 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 9 Fedora End Of Life 2016-07-19 13:34:45 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 10 Edgar Hoch 2016-07-19 18:02:01 EDT
It seems to me that "dnf --best install foo" mimics the behaviour of previous "yum install foo".

Today I run into the surprising behaviour (for me) that "dnf install foo" does nothing when package foo of any version is installed. Then I used "dnf upgrade foo", but his only works if a package is already installed.

So, the problem of the different behaviour of yum and dnf is not solved, but it may be intentional that administrators have to change there scripts when they have used "yum install foo" in the past (for installation or update, if they don't know if the package is already installed)?

Depending on the answer, I think this bug should either be reopened, or changed to closed wontfix.

Note You need to log in before you can comment on or make changes to this bug.