1 |
On 01/16/2015 02:14 AM, Sergei Trofimovich wrote: |
2 |
> On Mon, 1 Dec 2014 22:28:34 +0100 |
3 |
> Michał Górny <mgorny@g.o> wrote: |
4 |
> |
5 |
>> Disallow calling most of the ebuild helpers in global scope since they |
6 |
>> are meaningless in that context. Most of them are also prohibited by PMS |
7 |
>> for all EAPIs, so EAPI 6 sounds like a good moment to finally enforce |
8 |
>> that restriction. |
9 |
>> --- |
10 |
>> bin/eapi.sh | 2 +- |
11 |
>> 1 file changed, 1 insertion(+), 1 deletion(-) |
12 |
>> |
13 |
>> diff --git a/bin/eapi.sh b/bin/eapi.sh |
14 |
>> index e0ade02..5ab92f4 100644 |
15 |
>> --- a/bin/eapi.sh |
16 |
>> +++ b/bin/eapi.sh |
17 |
>> @@ -159,7 +159,7 @@ ___eapi_helpers_can_die() { |
18 |
>> } |
19 |
>> |
20 |
>> ___eapi_disallows_helpers_in_global_scope() { |
21 |
>> - [[ ${1-${EAPI}} =~ ^(4-python|5-progress)$ ]] |
22 |
>> + [[ ! ${1-${EAPI}} =~ ^(0|1|2|3|4|4-slot-abi|5|5-hdepend)$ ]] |
23 |
>> } |
24 |
>> |
25 |
>> ___eapi_unpack_is_case_sensitive() { |
26 |
> |
27 |
> Looks like it cries on ebuilds with unset EAPI in main tree (attached). |
28 |
> Can be easily fixed in tree by adding EAPI=0, but better handle it |
29 |
> here: ${EAPI-0} (untested!) |
30 |
|
31 |
Using ${EAPI-0} would not be the correct fix, because portage is |
32 |
supposed to export the EAPI that was previously determined via the |
33 |
_parse_eapi_ebuild_head function (preprocessor). |
34 |
-- |
35 |
Thanks, |
36 |
Zac |