Bug 1284228 - dnf selects kernel-debug-modules-extra instead of kernel-modules-extra when xl2tpd is installed.
dnf selects kernel-debug-modules-extra instead of kernel-modules-extra when x...
Status: CLOSED DUPLICATE of bug 1192189
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
25
All Linux
low Severity unspecified
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
: Triaged
: 1025301 1342300 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-22 00:42 EST by Gene Snider
Modified: 2016-11-07 03:31 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-07 03:31:27 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gene Snider 2015-11-22 00:42:32 EST
Description of problem:  xl2tpd, which is a dependency of NetworkManager-l2p, requires kmod(l2tp_ppp.ko).  This package is provided by:

$ sudo dnf provides 'kmod(l2tp_ppp.ko)'
Last metadata expiration check performed 23:38:05 ago on Fri Nov 20 14:30:52 2015.

kernel-debug-modules-extra-4.2.3-300.fc23.x86_64 : Extra kernel modules to match the kernel
Repo        : fedora

kernel-modules-extra-4.2.3-300.fc23.x86_64 : Extra kernel modules to match the kernel
Repo        : fedora

For some reason, dnf pulls in kernel-debug-modules-extras instead of kernel-modules-extras.  This pulls in two other debug packages:

$ sudo dnf --assumeno install xl2tpd --best
Last metadata expiration check performed 2:42:32 ago on Fri Nov 20 11:25:36 2015.
Dependencies resolved.
================================================================================================
 Package                            Arch           Version                Repository       Size
================================================================================
================
Installing:
 kernel-debug-core                  x86_64         4.2.6-300.fc23         updates          21 M
 kernel-debug-modules               x86_64         4.2.6-300.fc23         updates          18 M
 kernel-debug-modules-extra         x86_64         4.2.6-300.fc23         updates         2.3 M
 xl2tpd                             x86_64         1.3.6-9.fc23           fedora          140 k

Transaction Summary
================================================================================================
Install  4 Packages

The same packages are selected with or without --best.  Notice that's over 40M of packages.  This can be avoided by manually specifying kernel-modules-extras.  I guess the packager of xl2tpd could specify this in the requires, but how would he know he needs to?

$ sudo dnf --assumeno install xl2tpd kernel-modules-extra
Last metadata expiration check performed 2:46:08 ago on Fri Nov 20 11:25:36 2015.
Dependencies resolved.
================================================================================================
 Package                       Arch            Version                   Repository        Size
================================================================================================
Installing:
 kernel-modules-extra          x86_64          4.2.6-300.fc23            updates          2.2 M
 xl2tpd                        x86_64          1.3.6-9.fc23              fedora           140 k

Transaction Summary
================================================================================================
Install  2 Packages

Notice that only 2.2M is installed now.


Version-Release number of selected component (if applicable):  dnf 1.1.4-1.fc23


How reproducible: This should happen whenever xl2tpd is installed, which is pulled in by NetworkManager-l2tp.


Steps to Reproduce:
1.  Install Mate desktop.
2.  Run "dnf erase kernel-debug\*.  NetworkManager-l2tp and xl2tpd will be erased, also.
Or:
1.  Do a minimal install, then install xl2tpd.
2.  Observe the packages dnf selects.


Actual results:
Installing:
 kernel-debug-core                  x86_64         4.2.6-300.fc23         updates          21 M
 kernel-debug-modules               x86_64         4.2.6-300.fc23         updates          18 M
 kernel-debug-modules-extra         x86_64         4.2.6-300.fc23         updates         2.3 M
 xl2tpd


Expected results:
Installing:
 kernel-modules-extra          x86_64          4.2.6-300.fc23            updates          2.2 M
 xl2tpd


Additional info:  As I mentioned earlier, the expected behaviour could be forced by the xl2tpd packager.  However, it would be nice if dnf was just a little bit smarter about selecting packages when more than one supplies a dependency.
Comment 1 Honza Silhan 2015-11-23 08:22:57 EST
This could be probably fixed by adding `Suggests: kernel-modules-extra` into `kernel-core` package. We need to investigate it more and then reassign.
Comment 2 Gene Snider 2015-11-24 06:20:38 EST
The package "kernel-modules" needs the same fix.  Installing mathjax causes dnf to select "kernel-debug-modules" instead of "kernel-modules".
Comment 3 Gene Snider 2015-11-24 06:21:25 EST
How about making dnf prefer non-debug packages over debug packages?
Comment 4 Honza Silhan 2016-03-14 08:08:03 EDT
*** Bug 1025301 has been marked as a duplicate of this bug. ***
Comment 5 Gene Snider 2016-04-10 17:25:43 EDT
Another case in Fedora 24.  Installing sytemtap-devel, which is installed as part of the group "Development Tools" pulls in kernel-debug-devel.  Installing kernel-devel prior to installing systemtap-devel avoids the debug package.  The spec file for systemtap contains these lines:

Begin Quote

%package devel
Summary: Programmable system-wide instrumentation system - development headers, tools
Group: Development/System
License: GPLv2+
URL: http://sourceware.org/systemtap/
# Alternate kernel packages kernel-PAE-devel et al. have a virtual
# provide for kernel-devel, so this requirement does the right thing,
# at least past RHEL4.
Requires: kernel-devel
Requires: gcc make
# Suggest: kernel-debuginfo

End Quote

Why does dnf grab kernel-debug-devel when the spec file clearly calls for kernel-devel?

Gene
Comment 6 Honza Silhan 2016-06-06 07:27:08 EDT
*** Bug 1342300 has been marked as a duplicate of this bug. ***
Comment 7 Yaakov Selkowitz 2016-06-06 12:49:26 EDT
Is it possible that the relative deptrees could be considered as a factor when choosing one of several possible providers of a dependency?  IOW:

1) dnf sees Requires: kmod(l2tp_ppp.ko)
2) dnf finds both kernel-modules-extra and kernel-debug-modules-extra would satisfy that requirement
3) dnf compares the missing dependencies of kernel-modules-extra (none, because kernel and kernel-modules are already installed) and kernel-debug-modules-extra (which would require pulling in all the other kernel-debug-* packages which aren't installed yet)
4) dnf selects kernel-modules-extra by default
Comment 8 Fedora Admin XMLRPC Client 2016-07-08 05:36:10 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 9 Jan Kurik 2016-07-26 01:02:22 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.
Comment 10 Honza Silhan 2016-07-27 05:45:58 EDT
We could use distribution preference [1] for kernel non-debug packages

[1] https://fedoraproject.org/wiki/PackagingDrafts/ProvidesPreferences#Distribution_preference
Comment 11 Igor Gnatenko 2016-07-27 06:08:20 EDT
We should use SOLVER_FAVOR features.
Comment 12 Honza Silhan 2016-11-07 03:31:27 EST

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

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