1 |
Jeremy Olexa schrieb: |
2 |
> Ben de Groot wrote: |
3 |
> |
4 |
>> So, can we have a nice little table of which functions die by themselves |
5 |
>> and which ones need || die added in ebuilds? Please? |
6 |
>> |
7 |
>> Thanks, |
8 |
>> |
9 |
> |
10 |
> A quick grep of /usr/lib/portage/bin clues you in that every function |
11 |
> that is an external file does *not* die by itself. So, emake, do*, etc.. |
12 |
> |
13 |
> %% grep -c die * |grep -v ":0" |
14 |
> ebuild.sh:61 |
15 |
> etc-update:14 |
16 |
> isolated-functions.sh:18 |
17 |
> misc-functions.sh:26 |
18 |
> repoman:2 |
19 |
> |
20 |
> I believe this is because you can have those functions in a subshell and |
21 |
> then die won't behave predictably. I'm sure some PM people will correct |
22 |
> me if I am wrong. ;) |
23 |
> |
24 |
> -Jeremy |
25 |
> |
26 |
> |
27 |
|
28 |
From my knowledge and experience with sunrise: |
29 |
|
30 |
some functions that dont need "|| die": |
31 |
epatch, econf, eqmake3, eqmake4 |
32 |
|
33 |
some functions that need "|| die": |
34 |
emake, do* |
35 |
|
36 |
Afaik die wont work in a subshell independent of how it is called, so the die from econf wont work, |
37 |
but also the "emake || die" one would also not work. |
38 |
|
39 |
-- |
40 |
Thomas Sachau |
41 |
|
42 |
Gentoo Linux Developer |