On Thu, Apr 2, 2015 at 12:56 PM, Kent Fredric <kentfred...@gmail.com> wrote: > > On 3 April 2015 at 05:32, Rich Freeman <ri...@gentoo.org> wrote: >> >> Out of curiosity, what is keeping us from having USE flag dependencies >> handled dynamically, in the same way that package dependencies are? >> If portage can figure out that I need libxml2 installed even if I >> don't put it in /var/lib/portage/world, why can't it figure out that I >> need it built with USE=icu even if I don't put that in >> /etc/portage/package.use? > > I'd say its more a concept issue than an application issue. > > USE flags often signify a need for code to be recompiled to grant the > feature. > > How do you disambiguate between USE flags that *do* need a recompile to > enable their power, and those that *dont* need a recompile to enable their > power.
Why is this necessary? If a USE flag changes, just rebuild the application. > > Or even clarify to portage that, "The older version of X that didn't have > IUSE=foo, actually had feature foo, but just didn't have the use flag" vs > "The older version of X that didn't have IUSE=foo, didnt have feature foo or > the IUSE". Do what --newuse does. If a flag is added/removed, then rebuild the application. > > "Is this new useflag defaulted on because it already existed, or is it > defaulted on because its a new feature and its awesome" > > "Is this new useflag defaulted off because it didnt already exist, or did it > exist and were disabling the feature because its bad" > I'd suggest that the algorithm is: 1. When installing a new or updated package: 1a. set all the flags in accordance with configuration (explicit set/unset in profiles, make.conf, package.use) 1b. if these explicitly conflict with package dependencies then fail with an immediate error (that is, config says USE=foo, and package dep says atom[-foo] and so on 1c. additionally set flags as needed to satisfy package dependencies when they don't conflict with explicit configuration 2. When evaluating the dep tree to see if a package needs to be rebuilt, just keep the existing USE configuration unless it conflicts with explicit configuration or a package dependency. So, the goal would be to avoid rebuilding stuff just because we can. However, we would rebuild things if a user wants a flag to be set differently, or if there is now a dependency problem. -- Rich