Gentoo Archives: gentoo-dev

From: John Mylchreest <johnm@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Pending Removal of $KV
Date: Sun, 09 Jul 2006 16:21:09
Message-Id: 20060709161759.GB16275@getafix.willow.local
In Reply to: Re: [gentoo-dev] Pending Removal of $KV by "Kevin F. Quinn"
1 On Tue, Jun 20, 2006 at 02:32:36PM +0200, "Kevin F. Quinn" <kevquinn@g.o> wrote:
2 > > >>This is duplicating the superb efforts of the kernel team and of
3 > > >>linux-info eclass. As such I would like to deprecate $KV in favor
4 > > >>of using linux-info eclass. I don't see the need for portage to
5 > > >>export $KV into the environment for all packages.
6 >
7 > Yes please. linux-info.eclass is great; does (almost) exactly what
8 > should be done, i.e. depend on user-supplied kernel source & object
9 > locations.
10
11 Firstly, thanks for using it :)
12
13 If you have any suggections (speculating based off the "Almost" part please
14 feel free to talk to me about them and I'll see what I can do :)
15
16
17 > > >>There are a few packages left that use this. There will be a
18 > > >>tracker bug shortly. Mostly this mail is just a heads up ;)
19 > > > But any kind of checks against something in $KERNEL_DIR are just
20 > > > wrong, wrong, wrong. The only exception being when the ebuild is
21 > > > building something *against* those sources (kernel modules, and
22 > > > that's it).
23 > > >
24 > > > It's annoying to have virtual/linux-sources pulled as a dep of
25 > > > gnupg, iptables or any other package that can do fine without them.
26 >
27 > I do agree virtual/linux-sources shouldn't be a dependency. The
28 > ebuilds should depend on the existence of the kernel sources or
29 > objects against which the package will be built, which can only be
30 > detected in pkg_setup. To this end I think DEPEND should not be set in
31 > linux-info.eclass.
32
33 Additional to this linux-info is close to useless outside of an
34 available linux-source tree. We do provide an interface which should
35 very very rarely be used for running kernels get_running_version() and
36 in this case I can see why the source-tree can be dropped, but I dont
37 plan on doing so any time soon.
38
39 Really this all stems back to gentoo policy regarding building/testing
40 against kernel srctree/objtree which is as simple as anything
41 requiring or depending on kernel sources should always use those which
42 are pointed to by the "/usr/src/linux" symlink. This enabls us to build
43 packages against a target, rather than current. Cross-compiling would be
44 a nice example here.
45
46 > > In many cases those packages are looking for a specific kernel
47 > > feature to make sure support is enabled for it.
48 > >
49 > > You could argue that in the case where you aren't compiling against
50 > > the kernel that support being enabled isn't critical, but that is a
51 > > discussion you need to have with the package maintainers.
52 >
53 > I think it's wrong for ebuilds to refuse to build if support is missing
54 > from the build system kernel. ebuilds should not be using the
55 > configuration of the build system to decide whether to build pieces for
56 > the target system (such decisions should be made via USE), and
57 > certainly shouldn't die if run-time support isn't built on the build
58 > system (unless the support is actually needed for the build process
59 > itself, such that the build would fail). With linux-info.eclass you can
60
61 They can optionally be non-fatal, and you can also call the API directly
62 and handle it as required.
63
64 > specify the location of the kernel tree to build against
65 > (KBUILD_OUTPUT) and thus build for different kernel configurations as
66 > appropriate (the default being the build system kernel, which makes
67 > things simple for the common case where the target is the build system).
68 >
69 > In summary, I agree that $KV should disappear from portage, and that
70 > anything that depends on kernel configuration should use
71 > linux-info.eclass. Also I'd like to see the dependency on
72 > virtual/linux-sources removed from linux-info.eclass.
73
74 I've tried to clarify my point fairly well above, but the dependancy is
75 fairly strict by design. What in linux-mod except for my specific
76 example above would continue to work if there were no kernel sources
77 present? (I do of course know the answer but its rhetorical)
78
79 To that end is the reason why the dependancy still exists. That said,
80 I'm open to persuasion.
81
82 - John
83
84 --
85 Role: Gentoo Linux Kernel Lead
86 Gentoo Linux: http://www.gentoo.org
87 Public Key: gpg --recv-keys 9C745515
88 Key fingerprint: A0AF F3C8 D699 A05A EC5C 24F7 95AA 241D 9C74 5515

Replies

Subject Author
Re: [gentoo-dev] Pending Removal of $KV Georgi Georgiev <chutz@×××.net>