Red Hat Bugzilla – Bug 1255087
"dnf install foo" does not install the latest installonly version if an older version is installed
Last modified: 2016-07-19 18:02:01 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.
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
Nothing to do.
dnf should have installed the kernel from updates-testing that I asked it to
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.
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.
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?
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.
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.
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.
Ok, we will keep this open for tracking user demand.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
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.
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.