1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
Ciaran McCreesh wrote: |
5 |
> On Fri, 15 May 2009 14:43:29 -0500 |
6 |
> William Hubbs <williamh@g.o> wrote: |
7 |
>> On Thu, May 14, 2009 at 10:53:37PM +0100, Ciaran McCreesh wrote: |
8 |
>>> It can't, because it doesn't know the EAPI until it's sourced the |
9 |
>>> thing using bash. Using things like += in global scope will break |
10 |
>>> older bash versions to the point that they can't reliably extract |
11 |
>>> EAPI. |
12 |
>> |
13 |
>> I just figured out a line in bash that will get an EAPI without |
14 |
>> sourcing the ebuild: |
15 |
>> |
16 |
>> eval `grep '^EAPI=' ebuildfile | head -n 1` |
17 |
>> |
18 |
>> will set EAPI in the current scope to EAPI in the ebuild, without |
19 |
>> sourcing it, unless the issue with something like this would be its |
20 |
>> use of grep and head, but these are both in the system set, so unless |
21 |
>> you don't want to depend on the system set, I don't know what the |
22 |
>> objection would be. |
23 |
> |
24 |
> The objection is that your code doesn't work. It's entirely legal to |
25 |
> do, say: |
26 |
> |
27 |
> export EAPI="1" |
28 |
> |
29 |
> or: |
30 |
> |
31 |
> inherit versionator |
32 |
> |
33 |
> if version_is_at_least 2 ; then |
34 |
> EAPI="2" |
35 |
> else |
36 |
> EAPI="0" |
37 |
> fi |
38 |
> |
39 |
> Besides, if we were able to do what your code does, we'd just code it |
40 |
> natively, not use external programs. |
41 |
|
42 |
How is it possible to do these things encoded in the filename? |
43 |
|
44 |
Marijn |
45 |
|
46 |
- -- |
47 |
If you cannot read my mind, then listen to what I say. |
48 |
|
49 |
Marijn Schouten (hkBst), Gentoo Lisp project, Gentoo ML |
50 |
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-{lisp,ml} on FreeNode |
51 |
-----BEGIN PGP SIGNATURE----- |
52 |
Version: GnuPG v2.0.11 (GNU/Linux) |
53 |
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org |
54 |
|
55 |
iEYEARECAAYFAkoOhxcACgkQp/VmCx0OL2wXqACfSkZVqv2hcskm7Yw7vyizeh5r |
56 |
UnIAn1npT5j6CcN23WE3yG6p8WDZiF9D |
57 |
=bI9e |
58 |
-----END PGP SIGNATURE----- |