1 |
On Thu, Sep 27, 2012 at 10:30:21AM -0700, Zac Medico wrote: |
2 |
> On 09/27/2012 10:16 AM, Ian Stakenvicius wrote: |
3 |
> > On 27/09/12 01:07 PM, Zac Medico wrote: |
4 |
> >> On 09/27/2012 09:49 AM, Ulrich Mueller wrote: |
5 |
> >>> As far as I can see, only the definition of the usex function |
6 |
> >>> must be disabled. Please review the patch included below. |
7 |
> >>> |
8 |
> >>> Ulrich |
9 |
> >>> |
10 |
> >>> --- eutils.eclass 15 Sep 2012 16:16:53 -0000 1.403 +++ |
11 |
> >>> eutils.eclass 27 Sep 2012 16:45:14 -0000 @@ -1373,7 +1373,9 @@ # |
12 |
> >>> @DESCRIPTION: # If USE flag is set, echo [true output][true |
13 |
> >>> suffix] (defaults to "yes"), # otherwise echo [false |
14 |
> >>> output][false suffix] (defaults to "no"). +if has "${EAPI:-0}" 0 |
15 |
> >>> 1 2 3 4; then usex() { use "$1" && echo "${2-yes}$4" || echo |
16 |
> >>> "${3-no}$5" ; } #382963 +fi |
17 |
> >>> |
18 |
> >>> # @FUNCTION: prune_libtool_files # @USAGE: [--all] |
19 |
> >>> |
20 |
> > |
21 |
> >> Looks good to me. |
22 |
> > |
23 |
> >> It may not work for unofficial EAPIs that don't include usex, but |
24 |
> >> I guess there's nothing we can do for those, and they can just be |
25 |
> >> replaced with newer EAPIs that include usex. |
26 |
> > |
27 |
> > ....i actually just committed the fix discussed in #gentoo-dev , using |
28 |
> > 'declare -F' instead (similar to the eqawarn conditional declaration |
29 |
> > already in eutils.eclass) |
30 |
> > |
31 |
> > |
32 |
> > Sorry.. |
33 |
> |
34 |
> It's fine with me, but some of the other package manager devs might |
35 |
> object, since it makes assumptions about implementation details. |
36 |
|
37 |
PMS isn't particular clear on the metadata sourcing env for EAPIs- |
38 |
especially after the requirement that we pull the EAPI out of the file |
39 |
on the fly was aded. |
40 |
|
41 |
Point is, if it's EAPI5 the env should already export usex- even if |
42 |
it's disabled- so case/esac is better imo. |
43 |
~harring |