1 |
On 11/19/2017 01:00 PM, William L. Thomson Jr. wrote: |
2 |
>> |
3 |
>> This is broken: Static metadata like DEPEND must not depend |
4 |
>> on dynamic data like environment variables which are supposed |
5 |
>> to change at emerge time. |
6 |
> |
7 |
> I wondered about that. I guess adding to DEPEND via eclass is bad then. |
8 |
> |
9 |
|
10 |
So long as you add to DEPEND unconditionally, the issue that Martin |
11 |
pointed out does not apply. If you need to fudge the conditional, you |
12 |
can put it behind a USE flag; for example, |
13 |
|
14 |
DEPEND+=" some_use_expand_flag_foo? ( foo )" |
15 |
|
16 |
in the eclass. That's still adding to DEPEND unconditionally, even |
17 |
though its effect on the dependency tree (at "emerge" time) is |
18 |
conditional on the USE flag. |