From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-dev-return-14391-arch-gentoo-dev=gentoo.org@lists.gentoo.org>
Received: (qmail 22309 invoked from network); 23 Jul 2004 22:25:24 +0000
Received: from smtp.gentoo.org (156.56.111.197)
  by lists.gentoo.org with AES256-SHA encrypted SMTP; 23 Jul 2004 22:25:24 +0000
Received: from lists.gentoo.org ([156.56.111.196] helo=parrot.gentoo.org)
	by smtp.gentoo.org with esmtp (Exim 4.34)
	id 1Bo8Tj-0007Ll-GQ
	for arch-gentoo-dev@lists.gentoo.org; Fri, 23 Jul 2004 22:25:23 +0000
Received: (qmail 27594 invoked by uid 89); 23 Jul 2004 22:25:22 +0000
Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm
Precedence: bulk
List-Post: <mailto:gentoo-dev@gentoo.org>
List-Help: <mailto:gentoo-dev-help@gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev-unsubscribe@gentoo.org>
List-Subscribe: <mailto:gentoo-dev-subscribe@gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@gentoo.org
Received: (qmail 11788 invoked from network); 23 Jul 2004 22:25:22 +0000
Date: Fri, 23 Jul 2004 23:22:50 +0100
From: Ciaran McCreesh <ciaranm@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Message-Id: <20040723232250.6a3dbe33@snowdrop.home>
X-Mailer: Sylpheed version 0.9.11claws (GTK+ 1.2.10; i686-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: multipart/signed; protocol="application/pgp-signature";
 micalg="pgp-sha1";
 boundary="Signature=_Fri__23_Jul_2004_23_22_50_+0100_sU/Ev4zufO7hEkXw"
Subject: [gentoo-dev] Ebuilds referencing /usr/src/linux makes baby Jesus kill kittens
X-Archives-Salt: 6cf0a9a0-1c29-4617-883f-2d6c6ef6e98a
X-Archives-Hash: 069fcad9aa3bca4d93c3923262eb6e19

--Signature=_Fri__23_Jul_2004_23_22_50_+0100_sU/Ev4zufO7hEkXw
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

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


--Signature=_Fri__23_Jul_2004_23_22_50_+0100_sU/Ev4zufO7hEkXw
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBAY+996zL6DUtXhERAovDAJ0Zy60FjBYhLvhI+4TDAibXqab9PQCeLzxa
Wrq2BIOCduPES9BizBnPfXI=
=lJ/K
-----END PGP SIGNATURE-----

--Signature=_Fri__23_Jul_2004_23_22_50_+0100_sU/Ev4zufO7hEkXw--