From: Ciaran McCreesh <ciaranm@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Ebuilds referencing /usr/src/linux makes baby Jesus kill kittens
Date: Fri, 23 Jul 2004 23:22:50 +0100 [thread overview]
Message-ID: <20040723232250.6a3dbe33@snowdrop.home> (raw)
[-- Attachment #1: Type: text/plain, Size: 1566 bytes --]
Just a friendly reminder that you should really avoid messing around
with /usr/src/linux inside ebuilds. In particular, code like the
following is utterly wrong:
if [ ! -e "/usr/src/linux/include/linux/dm-ioctl.h" ] ; then
eerror
eerror "Your currently linked kernel (/usr/src/linux) hasn't"
eerror "been patched for device mapper support."
eerror
die "kernel not patched for device mapper support"
fi
Don't try to do clever things with /usr/src/linux to determine whether a
kernel has a particular feature. Especially don't go near .config. The
kernel running may not be the kernel in /usr/src/linux. The box in
question might be a chroot setup or a netboot system or a system built
with a crosscompiler, in which case /usr/src/linux* won't exist at all.
The user might be sharing kernel binaries between dozens of identical
boxes and only building on one. The user might be building kernels
in/home to avoid having to build kernels as root or chown a bunch of
stuff. The /usr/src/linux symlink might be out of date. The box might be
building binary packages for a different system.
You shouldn't be using /usr/src/linux for headers either. I suggest
people give the following a good read before they commit even more
broken code to the tree:
http://www.linuxmafia.com/faq/Kernel/usr-src-linux-symlink.html
Think of the kittens, people!
--
Ciaran McCreesh : Gentoo Developer (Sparc, MIPS, Vim, Fluxbox)
Mail : ciaranm at gentoo.org
Web : http://dev.gentoo.org/~ciaranm
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2004-07-23 22:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-23 22:22 Ciaran McCreesh [this message]
2004-07-23 22:52 ` [gentoo-dev] Ebuilds referencing /usr/src/linux makes baby Jesus kill kittens Donnie Berkholz
2004-07-24 0:42 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040723232250.6a3dbe33@snowdrop.home \
--to=ciaranm@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox