Hide Forgot
Please add "installonlypkg(kernel)" virtual provide to kernel-devel and kernel-source (if there is one?) packages to make them installonly again without having to resort to explicit lists in DNF.
Also, can the same provide be added to kernel itself?
What do you mean "installonly again"? AFAICS, they have never been marked as such in Fedora. kernel-source doesn't exist.
Also, what keys off of installonlypkg(kernel) ? I really don't think that's appropriate for kernel-devel because that does not actually provide a bootable kernel. I don't want anaconda, yum, dnf, whatever getting confused and thinking kernel-devel will suffice for the kernel package and then have people's machines not boot.
It just tags the package as installonly for package management purposes and it does not imply the package is something that can be booted and do some kernel stuff. And yes, due to various hacks in Yum, kernel-devel has been considered installonly for a long time.
Do those yum hacks still exist? The previously mentioned bug seems to be implying that dnf is doing something different, but I've missed if yum has been somehow modified to no longer do whatever it was doing. If so, why would yum be modify so? Also, were/are the yum hacks doing the exact equivalent of installonlypkg(kernel) for kernel-devel, or was it doing something different? If we're going to go off and invent virtual provides, I'd rather be explict and say installonlypkg(kernel-devel).
I always use yum to update kernel packages in Rawhide, and it still keeps all the kernel* packages synchronized. I don't see any sign of a yum change.
To be more precise, it keeps synchronized the versions of those kernel packages that can have multiple versions (kernel, kernel-devel, and kernel-modules-extra on my installation).
Josh: yep, Yum supports both ways to mark package installonly: explicitly remembering kernel-devel is installonly and and knowing that all packages providing installonly(kernel) are installonly. These both achieve the same thing and adding the requested provide will not modify Yum's behavior in any way.
What is the status of this?
*** Bug 1062997 has been marked as a duplicate of this bug. ***
To clarify what installonlypkg(kernel) does: DNF and PackageKit (and yum, probably?) have code that looks for packages that have virtual installonlypkg(kernel) provides. If an update is available that has this provide, then instead of updating it (rpm -U) it is installed in parallel (rpm -i) to the previous version. This is what makes the package managers keep the last 3 installed kernel versions. The bug here is that one of the kernel subpackages that _is_ supposed to be parallel installable is not marked as such. And that causes issues with DNF and PackageKit.
Setting needinfo regarding comment 9.
I'll try to get to this next week.
Small addendum: if a provenpackager wants to get to this sooner, we'd be happy for the help. Just make sure to stick around for any fallout too :).
Note the packages that are multiply installable have changed since the bug was filed. kernel isn't any more, but kernel-modules and kernel-core are, plus probably some of the debug packages. Also do you really want the qualifier to always be kernel or should it be the package name? What about PAE packages? For example currently kernel-PAE-modules provides installonlypkg(kernel-module). Is that correct?
(In reply to Bruno Wolff III from comment #16) > Note the packages that are multiply installable have changed since the bug > was filed. kernel isn't any more, but kernel-modules and kernel-core are, > plus probably some of the debug packages. > Also do you really want the qualifier to always be kernel or should it be > the package name? What about PAE packages? For example currently > kernel-PAE-modules provides installonlypkg(kernel-module). Is that correct? Looking at the dnf code, it only looks for installonlypkg({kernel,kernel-module}) so making the virtual provides anything other than one of those won't work. Yum actually looks for: kernel kernel-devel kernel-sources installonlypkg(kernel) installonlypkg(kernel-module) which is why stuff works with yum and not dnf. Anyway, towards the future. I've added the virtual provides in rawhide. It should show up in Thursday's Rawhide compose. I'll leave this open until we see if any fallout happens.
Dnf and yum behave differently in terms of removing old versions of kernel-devel. When old kernel packages are removed, yum correctly removes the corresponding kernel-devel package, but dnf does not. Is this a dnf bug? [root@localhost ~]# uname -r 3.18.1-2.fc22.x86_64 [root@localhost ~]# rpm -q kernel kernel-core kernel-devel kernel-modules kernel-modules-extra kernel-3.18.1-2.fc22.x86_64 kernel-3.19.0-0.rc3.git0.1.fc22.x86_64 kernel-3.19.0-0.rc5.git2.1.fc22.x86_64 kernel-core-3.18.1-2.fc22.x86_64 kernel-core-3.19.0-0.rc3.git0.1.fc22.x86_64 kernel-core-3.19.0-0.rc5.git2.1.fc22.x86_64 kernel-devel-3.18.1-2.fc22.x86_64 kernel-devel-3.19.0-0.rc3.git0.1.fc22.x86_64 kernel-devel-3.19.0-0.rc5.git2.1.fc22.x86_64 kernel-modules-3.18.1-2.fc22.x86_64 kernel-modules-3.19.0-0.rc3.git0.1.fc22.x86_64 kernel-modules-3.19.0-0.rc5.git2.1.fc22.x86_64 kernel-modules-extra-3.18.1-2.fc22.x86_64 kernel-modules-extra-3.19.0-0.rc3.git0.1.fc22.x86_64 kernel-modules-extra-3.19.0-0.rc5.git2.1.fc22.x86_64 [root@localhost ~]# dnf --best distro-sync Dependencies resolved. ============================================================================ Package Arch Version Repository Size ============================================================================ Installing: kernel x86_64 3.19.0-0.rc6.git0.1.fc22 rawhide 52 k kernel-core x86_64 3.19.0-0.rc6.git0.1.fc22 rawhide 19 M kernel-devel x86_64 3.19.0-0.rc6.git0.1.fc22 rawhide 9.3 M kernel-modules x86_64 3.19.0-0.rc6.git0.1.fc22 rawhide 17 M kernel-modules-extra x86_64 3.19.0-0.rc6.git0.1.fc22 rawhide 2.2 M Removing: kernel x86_64 3.19.0-0.rc3.git0.1.fc22 @System 0 kernel-core x86_64 3.19.0-0.rc3.git0.1.fc22 @System 41 M kernel-modules x86_64 3.19.0-0.rc3.git0.1.fc22 @System 17 M kernel-modules-extra x86_64 3.19.0-0.rc3.git0.1.fc22 @System 2.1 M Transaction Summary ============================================================================ Install 5 Packages Remove 4 Packages Total download size: 48 M Is this ok [y/N]: N Operation aborted. [root@localhost ~]# yum --skip-broken distro-sync Loaded plugins: langpacks Resolving Dependencies --> Running transaction check ---> Package kernel.x86_64 0:3.19.0-0.rc6.git0.1.fc22 will be installed ---> Package kernel-core.x86_64 0:3.19.0-0.rc6.git0.1.fc22 will be installed ---> Package kernel-devel.x86_64 0:3.19.0-0.rc6.git0.1.fc22 will be installed ---> Package kernel-modules.x86_64 0:3.19.0-0.rc6.git0.1.fc22 will be installed ---> Package kernel-modules-extra.x86_64 0:3.19.0-0.rc6.git0.1.fc22 will be installed --> Finished Dependency Resolution --> Running transaction check ---> Package kernel.x86_64 0:3.19.0-0.rc3.git0.1.fc22 will be erased ---> Package kernel-core.x86_64 0:3.19.0-0.rc3.git0.1.fc22 will be erased ---> Package kernel-devel.x86_64 0:3.19.0-0.rc3.git0.1.fc22 will be erased ---> Package kernel-modules.x86_64 0:3.19.0-0.rc3.git0.1.fc22 will be erased ---> Package kernel-modules-extra.x86_64 0:3.19.0-0.rc3.git0.1.fc22 will be erased --> Finished Dependency Resolution Dependencies Resolved ============================================================================ Package Arch Version Repository Size ============================================================================ Installing: kernel x86_64 3.19.0-0.rc6.git0.1.fc22 rawhide 52 k kernel-core x86_64 3.19.0-0.rc6.git0.1.fc22 rawhide 19 M kernel-devel x86_64 3.19.0-0.rc6.git0.1.fc22 rawhide 9.3 M kernel-modules x86_64 3.19.0-0.rc6.git0.1.fc22 rawhide 17 M kernel-modules-extra x86_64 3.19.0-0.rc6.git0.1.fc22 rawhide 2.2 M Removing: kernel x86_64 3.19.0-0.rc3.git0.1.fc22 @/kernel-3.19.0-0.rc3.git0.1.fc22.x86_64 0.0 kernel-core x86_64 3.19.0-0.rc3.git0.1.fc22 @/kernel-core-3.19.0-0.rc3.git0.1.fc22.x86_64 41 M kernel-devel x86_64 3.19.0-0.rc3.git0.1.fc22 @/kernel-devel-3.19.0-0.rc3.git0.1.fc22.x86_64 35 M kernel-modules x86_64 3.19.0-0.rc3.git0.1.fc22 @/kernel-modules-3.19.0-0.rc3.git0.1.fc22.x86_64 17 M kernel-modules-extra x86_64 3.19.0-0.rc3.git0.1.fc22 @/kernel-modules-extra-3.19.0-0.rc3.git0.1.fc22.x86_64 2.1 M Transaction Summary ============================================================================ Install 5 Packages Remove 5 Packages Total download size: 48 M Is this ok [y/d/N]: N Exiting on user command Your transaction was saved, rerun it with: yum load-transaction /tmp/yum_save_tx.2015-01-27.05-34.KZRxbY.yumtx [root@localhost ~]#
I wanted to note that while kernel gets installed multiple times, kernel-PAE doesn't. I doubt that either needs to be install multiple times these days, but I would expect the behavior to be the same for either of them.
Uh, kernel and kernel-PAE or kernel-devel and kernel-PAE-devel? The former should work fine, otherwise people wouldn't be able to update newer kernel-PAE packages and fall back to the older one if it doesn't boot.
bash-4.3# rpm -q kernel-PAE kernel-PAE-core kernel-PAE-3.20.0-0.rc0.git6.2.fc23.i686 kernel-PAE-core-3.19.0-1.fc22.i686 kernel-PAE-core-3.20.0-0.rc0.git5.1.fc23.i686 kernel-PAE-core-3.20.0-0.rc0.git6.2.fc23.i686 [root@pam bruno]# rpm -q kernel kernel-core kernel-3.20.0-0.rc0.git2.1.fc22.x86_64 kernel-3.20.0-0.rc0.git5.1.fc23.x86_64 kernel-3.20.0-0.rc0.git6.2.fc23.x86_64 kernel-core-3.20.0-0.rc0.git2.1.fc22.x86_64 kernel-core-3.20.0-0.rc0.git5.1.fc23.x86_64 kernel-core-3.20.0-0.rc0.git6.2.fc23.x86_64
Oh, right. kernel-<variant> is a metapackage. Hm. Andre, who are you setting needinfo for? Me or the dnf people? I've done the kernel change already modulo the issue Bruno sees, so I'm going to assume dnf.
(In reply to Josh Boyer from comment #22) > Andre, who are you > setting needinfo for? Me or the dnf people? I've done the kernel change > already modulo the issue Bruno sees, so I'm going to assume dnf. Either. There's a bug (see comment 18) and I don't know yet whether it's a dnf or kernel bug. Depending on that, either this bug needs to stay open, or the other one needs reopening. It's for anyone who can shed light on that.
Just to make sure I don't cause confusion, I am still using yum to update my systems. So the above example is for people using yum, not dnf. I have NOT set installonlypkgs in the yum.conf file of either machine.
Restoring needinfo for comment 18.
Andre, can you add to /etc/dnf/dnf.conf: `installonlypkgs=kernel installonlypkg(kernel) installonlypkg(kernel-module) installonlypkg(kernel-devel)` and try `dnf --best distro-sync` again, please? If it solve the issue I will add `installonlypkg(kernel-devel)` into installonlypkgs config by default.
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22
(In reply to Jan Silhan from comment #26) > Andre, can you add to /etc/dnf/dnf.conf: `installonlypkgs=kernel > installonlypkg(kernel) installonlypkg(kernel-module) > installonlypkg(kernel-devel)` and try `dnf --best distro-sync` again, please? > > If it solve the issue I will add `installonlypkg(kernel-devel)` into > installonlypkgs config by default. I tried this in Rawhide and it does not work. It now wants to remove an old version of kernel-devel, but the wrong one. Yum wants to remove the correct version of kernel-devel (4.0.0-0.rc1.git1.1.fc23). [root@localhost ~]# dnf --best distro-sync Failed to synchronize cache for repo '_local' from 'file:///var/lib/dnf/plugins/local': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried, disabling. Using metadata from Wed Mar 4 04:25:27 2015 Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: f22-backgrounds-kde noarch 21.91.0-1.fc23 rawhide 11 k f22-kde-theme noarch 21.91-1.fc23 rawhide 20 k kernel x86_64 4.0.0-0.rc2.git0.1.fc23 rawhide 57 k kernel-core x86_64 4.0.0-0.rc2.git0.1.fc23 rawhide 19 M kernel-devel x86_64 4.0.0-0.rc2.git0.1.fc23 rawhide 9.4 M kernel-modules x86_64 4.0.0-0.rc2.git0.1.fc23 rawhide 18 M kernel-modules-extra x86_64 4.0.0-0.rc2.git0.1.fc23 rawhide 2.2 M Upgrading: f21-kde-theme noarch 20.90-2.fc23 rawhide 1.7 M kde-settings noarch 22-2.fc23 rawhide 50 k kde-settings-plasma noarch 22-2.fc23 rawhide 20 k kde-settings-pulseaudio noarch 22-2.fc23 rawhide 20 k kernel-headers x86_64 4.0.0-0.rc2.git0.1.fc23 rawhide 986 k kernel-tools x86_64 4.0.0-0.rc2.git0.1.fc23 rawhide 142 k kernel-tools-libs x86_64 4.0.0-0.rc2.git0.1.fc23 rawhide 63 k kernel-tools-libs-devel x86_64 4.0.0-0.rc2.git0.1.fc23 rawhide 60 k Removing: kernel x86_64 4.0.0-0.rc1.git1.1.fc23 @System 0 kernel-core x86_64 4.0.0-0.rc1.git1.1.fc23 @System 43 M kernel-devel x86_64 4.0.0-0.rc1.git0.1.fc23 @System 35 M kernel-modules x86_64 4.0.0-0.rc1.git1.1.fc23 @System 18 M kernel-modules-extra x86_64 4.0.0-0.rc1.git1.1.fc23 @System 2.2 M Transaction Summary ================================================================================ Install 7 Packages Upgrade 8 Packages Remove 5 Packages Total download size: 52 M Is this ok [y/N]: N Operation aborted. [root@localhost ~]# uname -r 4.0.0-0.rc1.git0.1.fc23.x86_64 [root@localhost ~]#
That's strange. Andre, can you attach the debugdata of command `dnf --best distro-sync`, please [1]. [1] https://github.com/rpm-software-management/dnf/wiki/Bug-Reporting#depsolving-problem
Created attachment 1001581 [details] debugdata.tar.gz from "dnf --best --debugsolver distro-sync" while running oldest kernel Attached is the debugdata output while running the oldest kernel (4.0.0-0.rc2.git2.1.fc23.x86_64) showing that dnf always wants to remove the oldest version of kernel-devel, whether or not that is the currently running kernel. For other kernel packages, dnf wants to remove the correct version (the oldest version not currently running). Yum always removes the correct version for every kernel package, including kernel-devel.
Presumably the output in comment 30 needs to be looked at by the dnf devs. Is that happening? (I ask because this bug appears to have gone dead again, and because it's assigned to kernel, so maybe the dnf devs aren't looking.)
(In reply to Bruno Wolff III from comment #19) > I wanted to note that while kernel gets installed multiple times, kernel-PAE > doesn't. I doubt that either needs to be install multiple times these days, > but I would expect the behavior to be the same for either of them. Is there an existing bug filed for this? I believe I'm seeing this in F22 after a clean Final RC3 install (while updating from kernel-PAE-4.0.2 to kernel-PAE-4.0.4), while my 64-bit guests have multiple versions of kernel installed.
I don't believe there is a separate bug for this behavior.
I am sorry for response delay. The output from comment 28 is completely fine (kernel-devel has no connection to kernel). I am assuming you was running on kernel 4.0.0-0.rc1.git0.1.fc23. Package manager should treat every package the same. The only difference DNF does with kernel is it looks which kernel is running and protect it with all requirements when it is about to be removed by reached intallonly_limit. This report can be closed but to close bug 1062997 we need to add some weak dependencies to kernel package (bug 1226402).
So, can we get kernel-PAE added under this bug, or should we file a new one for that?
Change was made a long time ago. See bug 1333591 for fallout.