1 |
Just a friendly reminder that you should really avoid messing around |
2 |
with /usr/src/linux inside ebuilds. In particular, code like the |
3 |
following is utterly wrong: |
4 |
|
5 |
if [ ! -e "/usr/src/linux/include/linux/dm-ioctl.h" ] ; then |
6 |
eerror |
7 |
eerror "Your currently linked kernel (/usr/src/linux) hasn't" |
8 |
eerror "been patched for device mapper support." |
9 |
eerror |
10 |
die "kernel not patched for device mapper support" |
11 |
fi |
12 |
|
13 |
Don't try to do clever things with /usr/src/linux to determine whether a |
14 |
kernel has a particular feature. Especially don't go near .config. The |
15 |
kernel running may not be the kernel in /usr/src/linux. The box in |
16 |
question might be a chroot setup or a netboot system or a system built |
17 |
with a crosscompiler, in which case /usr/src/linux* won't exist at all. |
18 |
The user might be sharing kernel binaries between dozens of identical |
19 |
boxes and only building on one. The user might be building kernels |
20 |
in/home to avoid having to build kernels as root or chown a bunch of |
21 |
stuff. The /usr/src/linux symlink might be out of date. The box might be |
22 |
building binary packages for a different system. |
23 |
|
24 |
You shouldn't be using /usr/src/linux for headers either. I suggest |
25 |
people give the following a good read before they commit even more |
26 |
broken code to the tree: |
27 |
|
28 |
http://www.linuxmafia.com/faq/Kernel/usr-src-linux-symlink.html |
29 |
|
30 |
Think of the kittens, people! |
31 |
|
32 |
-- |
33 |
Ciaran McCreesh : Gentoo Developer (Sparc, MIPS, Vim, Fluxbox) |
34 |
Mail : ciaranm at gentoo.org |
35 |
Web : http://dev.gentoo.org/~ciaranm |