1 |
Hi everyone! |
2 |
|
3 |
Some weeks ago [1] portage changed its behavior regarding what gets |
4 |
stored as *DEPEND in the vdb. The curret behavior is to store the |
5 |
*DEPEND variables with evaluated use conditionals. That is, if the |
6 |
package has DEPEND="foo? ( cat/pkg2 )", either DEPEND="cat/pkg2" or |
7 |
DEPEND="" end up in the vdb, depending on the state of the use flag 'foo'. |
8 |
The old behavior was to store the unevaluated string. In the example |
9 |
above DEPEND="foo? ( cat/pkg2 )" would have been stored in the vdb. |
10 |
|
11 |
I propose to revert back to the original behavior. |
12 |
|
13 |
What is the proposed change good for? |
14 |
|
15 |
I see two reason. The first one more ideological and reads: "Don't throw |
16 |
away information for no good reason". I say for no good reason, because |
17 |
the evaluated value is easy to compute for users of the portage api, |
18 |
where the unevaluated value is lost. |
19 |
|
20 |
The second reason is that I want it to detect cases where the *DEPEND |
21 |
variables have been changed without rev bump. To do this I want to |
22 |
compare the *DEPEND string of the ebuild and the installed package. |
23 |
|
24 |
Why can't you use the evaluated *DEPEND string? |
25 |
|
26 |
Form time to time ebuilds get use flags added to IUSE without rev bump. |
27 |
If the new use flags are used in *DEPEND variables and I evaluate the |
28 |
use conditionals based on the enabled use flags of the installed |
29 |
package, I'll always treat the newly added use flag as disabled. The |
30 |
problem is that this might be wrong. |
31 |
Consider this example: |
32 |
installed package: |
33 |
IUSE="" |
34 |
RDEPEND="" |
35 |
ebuild: |
36 |
IUSE="some_feature" |
37 |
RDEPEND="some_feature? ( cat/pkg2 )" |
38 |
Assume the RDEPEND of the installed package is wrong, that is it should |
39 |
have had cat/pkg2 in RDEPEND. After the maintainer noticed that, he |
40 |
added a flag to disable the feature that needs cat/pkg2. Since |
41 |
some_feature will be treated as disabled when the use conditionals in |
42 |
the ebuild's RDEPEND are evaluated, RDEPEND will look unchanged. That |
43 |
means portage won't pick up the change when it should. |
44 |
|
45 |
Someone might come up with some logic to detect new use flags in |
46 |
*DEPEND, but this looks like a hack to me. The clean solution is to |
47 |
store the unevaluated string. |
48 |
|
49 |
Question is: Does anyone have a good argument to not use the old |
50 |
behavior again? |
51 |
|
52 |
Sebastian |
53 |
|
54 |
[1] commit e6be6590e99522f9be69e2af8eff87919d9bf31f on 2010-02-14 |