Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 120233 - linux-info depend on virtual/linux-sources
Summary: linux-info depend on virtual/linux-sources
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
: 122250 122783 141188 198141 202717 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-24 15:47 UTC by Rajiv Aaron Manglani (RETIRED)
Modified: 2007-12-19 09:36 UTC (History)
7 users (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 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2006-01-24 15:47:54 UTC
linux-info eclass should depend on having virtual/linux-sources installed. that is, inheriting linux-info should pull in kernel sources.
Comment 1 Henrik Brix Andersen 2006-02-08 04:59:18 UTC
Fixed in linux-info.eclass (revision 1.39) and linux-mod.eclass (revision 1.58).

Thank you for reporting this.
Comment 2 Joe Wells 2006-02-08 06:28:35 UTC
(In reply to comment #0)
> linux-info eclass should depend on having virtual/linux-sources
> installed. that is, inheriting linux-info should pull in kernel
> sources.

Why?  My system has gotten along fine without virtual/linux-sources
for the entire time I have been using Gentoo (nearly 2 years now).
Suddenly, Gentoo seems to think virtual/linux-sources is needed to
build x11-base/xorg-x11.  It was never needed before.

Why is virtual/os-headers not enough?

What feature of linux-info.eclass needs virtual/linux-sources and can
not work with just virtual/os-headers?


Comment 3 Henrik Brix Andersen 2006-02-08 06:42:38 UTC
(In reply to comment #2)
> What feature of linux-info.eclass needs virtual/linux-sources and can
> not work with just virtual/os-headers?

linux-info.eclass provides information about the kernel sources found in $KERNEL_DIR, it has nothing to do with virtual/os-headers.

Pretty much all of the functionality found in linux-info.eclass depends on a kernel source being available.


Comment 4 Henrik Brix Andersen 2006-02-08 06:50:03 UTC
xorg-x11 uses linux-info::kernel_is() which is a function for checking the kernel version found in $KERNEL_DIR ...
Comment 5 Georgi Georgiev 2006-02-15 16:11:59 UTC
I second comment #2.

My reasons are about gnupg which already had a bug open at bug 113474.

So, can we work something out to *not* require the kernel sources unless absolutely necessary?

Don't forget that there are valid setups where the running kernel is not necessarily located at /usr/src/linux.

Or at least provide a mock-sources package that would install the bare minimum of files requird by linux-info. Makefile, .config and what else? I'd still hate it, but it would be bareable.
Comment 6 John Mylchreest (RETIRED) gentoo-dev 2006-02-16 01:24:11 UTC
anything using linux-info/linux-mod (especially the latter) kind of has a pre-requisite of a kernel source tree. This has been spoke about to fall back on, lets say uname -r, but there is no way to work out which part of the version string is EXTRA,LOCAL etc. Anyways, this (although a good point) was always going to be problematic for several reasons.

Namely, its against policy to assume the current running kernel. It doesnt provide granularity. It's not capable of checking kernel config prerequisites. etc.

also: "Don't forget that there are valid setups where the running kernel is not
necessarily located at /usr/src/linux."

Thats why you have the possibility to over-ride that with KERNEL_DIR, and also if you really want to, KBUILD_OUTPUT
Comment 7 Joe Wells 2006-02-16 18:37:07 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > What feature of linux-info.eclass needs virtual/linux-sources and can
> > not work with just virtual/os-headers?
> 
> linux-info.eclass provides information about the kernel sources found in
> $KERNEL_DIR, it has nothing to do with virtual/os-headers.
> 
> Pretty much all of the functionality found in linux-info.eclass depends on a
> kernel source being available.

What _information_ does it need?

I have just done an "emerge world" after the change that "fixed" this
bug and discovered that the package
sys-kernel/gentoo-sources-2.6.15-r5 takes 282,263,552 bytes of disk
space once installed.  This filled up my hard disk and caused lots of
things to start failing, so I had to immediately take emergency action
and unmerge the package.

Does linux-info.eclass really need 282,263,552 bytes of information to
do its job?

Obviously all the packages I am using don't need this information
because my system has worked perfectly for years without it.

Can you please undo this?  Or change all the other packages in portage
that don't really need this information (which is clearly most of
them) to stop using linux-info.eclass?

(In reply to comment #4)
> xorg-x11 uses linux-info::kernel_is() which is a function for checking the
> kernel version found in $KERNEL_DIR ...

Why can't it just use "uname"?

I would like to point out that I am not even running a kernel compiled
by portage as I am using coLinux which needs a special kernel which
actually lives on my Windows file system and doesn't exist in my Linux
file system.  So this approach can not possibly be obtaining useful
information.  I imagine I am not alone in this situation.

I would rather not have to open a separate bug report on the problems
caused by this "fix".
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2006-02-17 01:55:06 UTC
*** Bug 122250 has been marked as a duplicate of this bug. ***
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2006-02-17 01:58:20 UTC
*** Bug 122783 has been marked as a duplicate of this bug. ***
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2006-02-17 02:13:40 UTC
Reopen, see Bug 122783, Comment #5 for a possible solution.
Comment 11 John Mylchreest (RETIRED) gentoo-dev 2006-02-17 04:35:04 UTC
re-closing this bug. In response to the question regarding the requirement of kernel sources...

Basically, linux-info uses a lot of checks against kernel-source files to determine target kernel-version, Makefile specifics, CONFIG_* specifics etc.

the 200m package is simply that big, because thats the size of a decompressed kernel source. There is a get_running_version function which uses uname -r but it is heavily discouraged except in specific cases because of the policy we use when determining what kernel version we are building against.

You can add kernel virtuals etc to /etc/portage/package.provided without any issues to satisfy this dependancy requirement, and pass KERNEL_DIR to point to sources.

I will be reviewing the logic of a couple of tests (kernel_is generally speaking) to better accomodate Gentoo/ALT but there will be little changes made outside of this.
An example of such has been a conditional test for kernel_linux on the linux-sources depend, but there are a few small niggles with non-linux kernels and linux-info. Of course... its very questionable whether it should be using linux-info anyways and there will be a restructure once elibs are widely adopted to overcome this problem and provide much cleaner cross-kernel support.

If you feel I am missing some technical issues, please comment on the bug and re-open, but for the time being I am closing as WONTFIX.

Wranglers, please feel free to continue assigning dupes to this but removing dependancies from the eclass re: sources isnt going to happen when the vast majority of functions require information from source-tree files.
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2006-07-20 09:26:32 UTC
*** Bug 141188 has been marked as a duplicate of this bug. ***
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2007-11-05 08:28:15 UTC
*** Bug 198141 has been marked as a duplicate of this bug. ***
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2007-12-18 22:19:45 UTC
*** Bug 202717 has been marked as a duplicate of this bug. ***