Gentoo Archives: gentoo-dev

From: William Hubbs <williamh@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] The fallacies of GLEP55
Date: Fri, 15 May 2009 19:43:31
Message-Id: 20090515194329.GA16382@linux1
In Reply to: Re: [gentoo-dev] The fallacies of GLEP55 by Ciaran McCreesh
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 On Thu, May 14, 2009 at 10:53:37PM +0100, Ciaran McCreesh wrote:
5 > It can't, because it doesn't know the EAPI until it's sourced the thing
6 > using bash. Using things like += in global scope will break older bash
7 > versions to the point that they can't reliably extract EAPI.
8
9 I just figured out a line in bash that will get an EAPI without
10 sourcing the ebuild:
11
12 eval `grep '^EAPI=' ebuildfile | head -n 1`
13
14 will set EAPI in the current scope to EAPI in the ebuild, without
15 sourcing it, unless the issue with something like this would be its use
16 of grep and head, but these are both in the system set, so unless you
17 don't want to depend on the system set, I don't know what the objection
18 would be.
19
20 - --
21 William Hubbs
22 gentoo accessibility team lead
23 williamh@g.o
24 -----BEGIN PGP SIGNATURE-----
25 Version: GnuPG v2.0.11 (GNU/Linux)
26
27 iEYEARECAAYFAkoNxeEACgkQblQW9DDEZThaFACfYSQTpPTxfh3MzvErzbSNGZ8M
28 46AAoIyGTJxbWQ4Be7075uHXYN+hfnDl
29 =X3Wn
30 -----END PGP SIGNATURE-----

Replies

Subject Author
Re: [gentoo-dev] The fallacies of GLEP55 Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>