1 |
On Thu, Apr 2, 2015 at 12:56 PM, Kent Fredric <kentfredric@×××××.com> wrote: |
2 |
> |
3 |
> On 3 April 2015 at 05:32, Rich Freeman <rich0@g.o> wrote: |
4 |
>> |
5 |
>> Out of curiosity, what is keeping us from having USE flag dependencies |
6 |
>> handled dynamically, in the same way that package dependencies are? |
7 |
>> If portage can figure out that I need libxml2 installed even if I |
8 |
>> don't put it in /var/lib/portage/world, why can't it figure out that I |
9 |
>> need it built with USE=icu even if I don't put that in |
10 |
>> /etc/portage/package.use? |
11 |
> |
12 |
> I'd say its more a concept issue than an application issue. |
13 |
> |
14 |
> USE flags often signify a need for code to be recompiled to grant the |
15 |
> feature. |
16 |
> |
17 |
> How do you disambiguate between USE flags that *do* need a recompile to |
18 |
> enable their power, and those that *dont* need a recompile to enable their |
19 |
> power. |
20 |
|
21 |
Why is this necessary? If a USE flag changes, just rebuild the application. |
22 |
|
23 |
> |
24 |
> Or even clarify to portage that, "The older version of X that didn't have |
25 |
> IUSE=foo, actually had feature foo, but just didn't have the use flag" vs |
26 |
> "The older version of X that didn't have IUSE=foo, didnt have feature foo or |
27 |
> the IUSE". |
28 |
|
29 |
Do what --newuse does. If a flag is added/removed, then rebuild the |
30 |
application. |
31 |
|
32 |
> |
33 |
> "Is this new useflag defaulted on because it already existed, or is it |
34 |
> defaulted on because its a new feature and its awesome" |
35 |
> |
36 |
> "Is this new useflag defaulted off because it didnt already exist, or did it |
37 |
> exist and were disabling the feature because its bad" |
38 |
> |
39 |
|
40 |
I'd suggest that the algorithm is: |
41 |
|
42 |
1. When installing a new or updated package: |
43 |
1a. set all the flags in accordance with configuration (explicit |
44 |
set/unset in profiles, make.conf, package.use) |
45 |
1b. if these explicitly conflict with package dependencies then fail |
46 |
with an immediate error (that is, config says USE=foo, and package dep |
47 |
says atom[-foo] and so on |
48 |
1c. additionally set flags as needed to satisfy package dependencies |
49 |
when they don't conflict with explicit configuration |
50 |
|
51 |
2. When evaluating the dep tree to see if a package needs to be |
52 |
rebuilt, just keep the existing USE configuration unless it conflicts |
53 |
with explicit configuration or a package dependency. |
54 |
|
55 |
So, the goal would be to avoid rebuilding stuff just because we can. |
56 |
However, we would rebuild things if a user wants a flag to be set |
57 |
differently, or if there is now a dependency problem. |
58 |
|
59 |
|
60 |
-- |
61 |
Rich |