From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1957 invoked from network); 1 Sep 2004 03:06:01 +0000 Received: from smtp.gentoo.org (156.56.111.197) by lists.gentoo.org with AES256-SHA encrypted SMTP; 1 Sep 2004 03:06:01 +0000 Received: from lists.gentoo.org ([156.56.111.196] helo=parrot.gentoo.org) by smtp.gentoo.org with esmtp (Exim 4.34) id 1C2LRf-0003Lq-FX for arch-gentoo-dev@lists.gentoo.org; Wed, 01 Sep 2004 03:06:00 +0000 Received: (qmail 10117 invoked by uid 89); 1 Sep 2004 03:05:58 +0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 6485 invoked from network); 1 Sep 2004 03:05:57 +0000 From: Olivier Fisette To: gentoo-dev@lists.gentoo.org Date: Tue, 31 Aug 2004 23:05:37 -0400 User-Agent: KMail/1.7 References: <4134FB0B.9060501@ifm.liu.se> <200408311928.19670.vapier@gentoo.org> In-Reply-To: <200408311928.19670.vapier@gentoo.org> Organization: Gentoo Foundation MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1127635.noA0j47NqP"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200408312305.54733.ribosome@gentoo.org> Subject: Re: [gentoo-dev] per-package environment variables. X-Archives-Salt: 4c40cdfa-9421-4040-b804-6b3267c3fd13 X-Archives-Hash: a8fc9291bc005d87ef26a034206fea2a --nextPart1127635.noA0j47NqP Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello all, I see two problems with the implementations that were suggested up to now f= or=20 per-package environment variables. 1) They do not allow any flexibility with regard to package versions, as=20 opposed to other Portage configuration files ("package.mask", "package.use"= ,=20 etc.). The file "/etc/portage/packages.env/app-shells/bash" would be source= d=20 for all versions of "app-shells/bash", for instance. This may be problemati= c=20 for SLOTable packages, and prevents a user from defining or modifying a=20 variable for a particular version of a package (to work around a bug, for=20 example, such as "pymol-0.95" will segfault when raytracing if compiled wit= h=20 "-fgcse"). 2) Having a hierarchy of files and directories miroring the Portage tree, w= ith=20 symlinks and such, looks a bit complicated more complicated than is needed.= =20 I'd rather have to deal with only one or a few files. My initial suggestion was not flexible enough, since it required to declare= =20 the variables repeatedly for each package. Here is another idea: A file named "/etc/portage/package.env" could contain entries such as: app-office/openoffice lang_ru >=3Dapp-sci/emboss-2.8.0 icc =3Dapp-sci/pymol-0.95* gcc_low_opt The keywords "lang_ru", "ifc" and "gcc_low_opt" would match files with thes= e=20 names, contained in "/etc/portage/env.d". These bash scripts would be sourc= ed=20 to provide per-package env vars. "/etc/portage/env.d/icc" would contain=20 something along these lines: CC=3Dicc CXX=3Dicc CFLAGS=3D"-O2 -xN -noalign" CXXFLAGS=3D$CFLAGS USE=3D"icc" If we wanted to make things even easier to configure, we could have somethi= ng=20 like the following in "/etc/portage/package.env": =3Dapp-sci/pymol-0.95* [ CC=3D"gcc" CFLAGS=3D"-O1" ] =2E.. were a keyword is replaced by a delimited short bash script that woul= d be=20 sourced to provide per package env vars. This would avoid having to create= =20 files in "/etc/portage/env.d" which target only one package. I don't think this approach is elegant or powerful. A better mechanism woul= d=20 allow to filter and replace flags (like flag-o-matic), to choose compilers= =20 and have them merged as dependencies when needed, etc. However, per-package= =20 env vars would be enough in 99 % of the cases, and would extend farther tha= n=20 just compilers and compiler flags. =2D-=20 Olivier Fisette (ribosome) Gentoo Linux Developer --nextPart1127635.noA0j47NqP Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBBNTySr/GGfYtwOqoRAmo2AJ9QhF0DwwoWRZ9eEg/26uGNvVOOcwCfVvuz /EgUIMmUXJDNiFkRZ8+NDA4= =+93q -----END PGP SIGNATURE----- --nextPart1127635.noA0j47NqP--