Bug 1079906 - mark kernel-devel installonly
Summary: mark kernel-devel installonly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 22
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-24 09:38 UTC by Ales Kozumplik
Modified: 2016-05-26 19:37 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-26 19:37:03 UTC
Type: Bug


Attachments (Terms of Use)
debugdata.tar.gz from "dnf --best --debugsolver distro-sync" while running oldest kernel (6.63 MB, application/octet-stream)
2015-03-14 07:22 UTC, Andre Robatino
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1226402 0 unspecified CLOSED add to kernel weak dependencies for kernel-devel and kernel-modules-extra 2021-02-22 00:41:40 UTC

Internal Links: 1226402

Description Ales Kozumplik 2014-03-24 09:38:18 UTC
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.

Comment 1 Ales Kozumplik 2014-03-24 09:46:10 UTC
Also, can the same provide be added to kernel itself?

Comment 2 Josh Boyer 2014-03-25 13:13:09 UTC
What do you mean "installonly again"?  AFAICS, they have never been marked as such in Fedora.

kernel-source doesn't exist.

Comment 3 Josh Boyer 2014-03-25 13:17:04 UTC
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.

Comment 4 Ales Kozumplik 2014-03-25 15:47:06 UTC
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.

Comment 5 Josh Boyer 2014-03-25 17:59:19 UTC
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).

Comment 6 Andre Robatino 2014-03-26 04:24:42 UTC
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.

Comment 7 Andre Robatino 2014-03-26 07:48:13 UTC
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).

Comment 8 Ales Kozumplik 2014-03-26 10:32:22 UTC
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.

Comment 9 Andre Robatino 2014-06-11 14:19:43 UTC
What is the status of this?

Comment 10 Andre Robatino 2014-07-23 10:27:37 UTC
*** Bug 1062997 has been marked as a duplicate of this bug. ***

Comment 11 Kalev Lember 2014-07-23 10:36:08 UTC
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.

Comment 12 Andre Robatino 2014-09-01 09:08:09 UTC
Setting needinfo regarding comment 9.

Comment 14 Josh Boyer 2015-01-06 22:48:59 UTC
I'll try to get to this next week.

Comment 15 Josh Boyer 2015-01-06 22:52:09 UTC
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 :).

Comment 16 Bruno Wolff III 2015-01-07 07:05:36 UTC
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?

Comment 17 Josh Boyer 2015-01-13 19:36:31 UTC
(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.

Comment 18 Andre Robatino 2015-01-27 10:39:27 UTC
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 ~]#

Comment 19 Bruno Wolff III 2015-02-17 16:43:49 UTC
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.

Comment 20 Josh Boyer 2015-02-17 21:07:40 UTC
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.

Comment 21 Bruno Wolff III 2015-02-17 22:57:04 UTC
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

Comment 22 Josh Boyer 2015-02-18 00:30:54 UTC
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.

Comment 23 Andre Robatino 2015-02-18 00:42:29 UTC
(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.

Comment 24 Bruno Wolff III 2015-02-18 19:16:06 UTC
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.

Comment 25 Andre Robatino 2015-02-18 19:18:00 UTC
Restoring needinfo for comment 18.

Comment 26 Honza Silhan 2015-03-03 17:00:35 UTC
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.

Comment 27 Jaroslav Reznik 2015-03-03 17:12:00 UTC
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

Comment 28 Andre Robatino 2015-03-04 09:51:05 UTC
(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 ~]#

Comment 29 Honza Silhan 2015-03-12 12:08:54 UTC
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

Comment 30 Andre Robatino 2015-03-14 07:22:14 UTC
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.

Comment 31 Andre Robatino 2015-05-12 10:26:15 UTC
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.)

Comment 32 Andre Robatino 2015-05-24 18:11:36 UTC
(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.

Comment 33 Bruno Wolff III 2015-05-24 20:15:02 UTC
I don't believe there is a separate bug for this behavior.

Comment 34 Honza Silhan 2015-05-29 16:30:43 UTC
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).

Comment 35 Orion Poplawski 2015-11-22 05:36:13 UTC
So, can we get kernel-PAE added under this bug, or should we file a new one for that?

Comment 36 Josh Boyer 2016-05-26 19:37:03 UTC
Change was made a long time ago.  See bug 1333591 for fallout.


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