1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
|
5 |
On Jun 11, 2004, at 2:01 PM, Ned Ludd wrote: |
6 |
|
7 |
> On Fri, 2004-06-11 at 14:17, Paul de Vrieze wrote: |
8 |
>>> IUSE isnt defined when portage hits that (it is defined later on) so |
9 |
>>> you |
10 |
>>> get the warning message ... portage needs a way to handle conditional |
11 |
>>> inherits, so you cant really say the eclass/ebuild is broken |
12 |
>>> |
13 |
>> No it doesn't, those eclasses / ebuilds need to be written in such |
14 |
>> that there |
15 |
>> is no need for a conditional use of them. |
16 |
> |
17 |
> Well in the case if the flag-o-matic one, it's going to yap at us no |
18 |
> matter what. The IUSE is defined unconditionally, first properly |
19 |
> IUSE=debug then later on IUSE="$IUSE debug" |
20 |
> |
21 |
> The only way I've found to get portage to shutup and behave half sane |
22 |
> is |
23 |
> to hack the .ebuild.sh |
24 |
> |
25 |
> -if ! hasq "${u}" ${IUSE} && ! hasq "${u}" ${PORTAGE_ARCHLIST} selinux; |
26 |
> then |
27 |
> +if ! hasq "${u}" ${IUSE} && ! hasq "${u}" ${PORTAGE_ARCHLIST} selinux |
28 |
> debug; then |
29 |
Use this instead; |
30 |
|
31 |
if ! hasq "${u}" ${IUSE} && ! hasq "${u}" ${PORTAGE_ARCHLIST} selinux; |
32 |
then |
33 |
- - echo "QA Notice: USE Flag '${u}' not in IUSE for ${CATEGORY}/${PF}" |
34 |
>&2 |
35 |
+ if ! hasq "${u}" ${E_IUSE}; then |
36 |
+ echo "QA Notice: USE Flag '${u}' not in IUSE for ${CATEGORY}/${PF}" |
37 |
>&2 |
38 |
+ else |
39 |
+ echo "QA Notice: USE Flag '${u}' was accessed in the global scope, |
40 |
but is not available until after the ebuild/eclass has been fully |
41 |
sourced: ${CATEGORY}/${PF}" >&2 |
42 |
+ echo " the offending function/check probably belongs in |
43 |
pkg_setup()." >&2 |
44 |
+ fi |
45 |
fi |
46 |
|
47 |
|
48 |
For .51 all iuse definitions by eclass's are shoved into E_IUSE, to |
49 |
protect them from being stomped on by A) other eclasses (an eclass, |
50 |
inheriting another eclass for instance), and B) the ebuild itself. |
51 |
Using glibc as an example, ebuild.sh does the inherit's, pushing the |
52 |
eclass defined IUSE's into E_IUSE; after the ebuild has been sourced, |
53 |
E_IUSE is merged into IUSE. |
54 |
|
55 |
Problem is that some ebuilds have calls in the global scope that access |
56 |
those vars- strip-flags in glibc for instance. |
57 |
Alternatively, could modify useq so that it checks both IUSE and |
58 |
E_IUSE, rather then what I defined above... |
59 |
~brian |
60 |
-----BEGIN PGP SIGNATURE----- |
61 |
Version: GnuPG v1.2.4 (Darwin) |
62 |
|
63 |
iD8DBQFAyi9EvdBxRoA3VU0RAkZrAKDcnA1ztPiXI53k64dXcwJANkgG2gCfdffk |
64 |
3dhZFAHoHe4XnOdtadYVkRw= |
65 |
=djQn |
66 |
-----END PGP SIGNATURE----- |
67 |
|
68 |
|
69 |
-- |
70 |
gentoo-dev@g.o mailing list |