1 |
Robin H. Johnson wrote: [Thu Jul 07 2005, 05:07:06PM EDT] |
2 |
> On Thu, Jul 07, 2005 at 04:49:13PM -0400, Aron Griffis wrote: |
3 |
> > Current (possibly unwritten) policy: |
4 |
> > - eclasses declare USE-flags they honor in their own IUSE |
5 |
> > - ebuilds declare USE-flags they honor in their own IUSE |
6 |
> > - ebuilds do not declare USE-flags honored by eclasses they inherit |
7 |
> |
8 |
> The policy itself is almost fine, it's the checking we need to improve. |
9 |
> |
10 |
> The only policy problem case that is where an eclass has a flag |
11 |
> declared, but the ebuild doesn't use that part of the eclass at all, on |
12 |
> purpose. Either the ebuild/eclass should be changed, or we should have |
13 |
> a way to take flags out of IUSE further down the line. |
14 |
|
15 |
I don't think the last suggestion makes sense. It adds complexity to |
16 |
IUSE declarations while increasing the linkage between eclasses and |
17 |
ebuilds. It's not much better to remove IUSE flags when they aren't |
18 |
used than to add them when they are used... |
19 |
|
20 |
> > So right now the policy is broken, but the apparent alternative is |
21 |
> > unmanageable. Ideas? |
22 |
> |
23 |
> Before changing more, it would be good to have some proper repoman |
24 |
> checks for this stuff. |
25 |
|
26 |
Before changing more what? |
27 |
|
28 |
> It should be easily doable, as there are only a few proper ways to use |
29 |
> USE flags in your ebuild. This would also help catch ebuilds/eclasses |
30 |
> not declaring IUSE properly, or having old stuff in IUSE that isn't |
31 |
> actually used anymore. |
32 |
> |
33 |
> The only official ways to use USE flags are (at least to my knowledge): |
34 |
> use FLAG |
35 |
> usev FLAG |
36 |
> useq FLAG |
37 |
> use_enable FLAG |
38 |
> use_with FLAG |
39 |
|
40 |
The more complex eclasses have front-ends to USE, for example php and |
41 |
mozconfig. I think you will quickly find that it is not that "easily |
42 |
doable" to catch this stuff in repoman, though it could certainly be |
43 |
improved. |
44 |
|
45 |
If you're going to teach repoman to read ebuilds and eclasses, create |
46 |
a call graph, trace it for USE-flags, and generate what repoman thinks |
47 |
IUSE should be... well, suffice it to say I don't see this happening |
48 |
soon. |
49 |
|
50 |
Regards, |
51 |
Aron |
52 |
|
53 |
-- |
54 |
Aron Griffis |
55 |
Gentoo Linux Developer |