Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 338235 - linux-mod.eclass: conditional to disable DEPEND="kernel_linux? ( virtual/linux-sources )"
Summary: linux-mod.eclass: conditional to disable DEPEND="kernel_linux? ( virtual/linu...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Kernel Miscellaneous
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-20 21:41 UTC by Fabio Erculiani (RETIRED)
Modified: 2010-10-30 21:55 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Erculiani (RETIRED) gentoo-dev 2010-09-20 21:41:54 UTC
Long story short: I'm using linux-mod.eclass in the kernel binary ebuilds (sys-kernel/linux-sabayon, via sabayon-kernel.eclass -- sabayon overlay) to handle part of the build/deployment process of kernel modules. The only problem is that linux-mod adds virtual/linux-sources to DEPEND, which is kinda unwanted in this particular case, given the mixed usage of kernel-2 and linux-mod (the former PROVIDEs virtual/linux-sources).

Would it be possible to change linux-mod in order to be able to disable it? This would make possible to engage further discussions regarding providing kernel binary ebuilds directly in Portage.

Reproducible: Always

Steps to Reproduce:
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-09-20 22:06:30 UTC
virtual/linux-sources DEPEND only, not RDEPEND.
The only time DEPEND should be used for linux-mod ebuilds is when they are actually building.

If you have some binpkg of a kernel module bringing in the sources, we need to fix it's ebuild rather.
Comment 2 Fabio Erculiani (RETIRED) gentoo-dev 2010-09-21 05:46:11 UTC
Right, but a kernel cannot have a DEPEND itself (virtual/linux-sources).
Real use case example:
- kernel binary (+ modules) ebuild: http://gitweb.sabayon.org/?p=overlay.git;a=blob;f=sys-kernel/linux-sabayon/linux-sabayon-2.6.35-r5.ebuild;hb=HEAD
- eclass wrapping linux-mod and kernel-2: http://gitweb.sabayon.org/?p=overlay.git;a=blob;f=eclass/sabayon-kernel.eclass;hb=HEAD

the kernel ebuild ends up having: DEPEND="virtual/linux-sources".
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-10-25 05:58:50 UTC
lxnay:
Thinking about this more, your eclass shouldn't be bringing in both linux-mod and kernel-2, AND it shouldn't be providing virtual/linux-sources at all, if it's only install a binary kernel without sources.
Comment 4 Fabio Erculiani (RETIRED) gentoo-dev 2010-10-25 09:45:59 UTC
Actually, the only reason for me using linux-mod_pkg_preinst, linux-mod_pkg_postinst is for spawning depmod (update_depmod). Maybe it's too much or maybe the depmod stuff could be moved somewhere else? Or I could duplicate the code, unwanted.
Comment 5 Fabio Erculiani (RETIRED) gentoo-dev 2010-10-30 16:25:30 UTC
I suppose I can then mark it as WORKSFORME.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-10-30 21:55:04 UTC
Let's see which functions other than depmod deserve to be extracted, and make a new eclass that's just helper functions, with no side effects like linux-mod and linux-sources.