For build order calculations, emerge should drop "optional" dependencies (--with-bdeps=y) before it drops "satisfied" dependencies which may be broken (bug 199856). This will fix it: > --- a/lib/_emerge/DepPrioritySatisfiedRange.py > +++ b/lib/_emerge/DepPrioritySatisfiedRange.py > @@ -9,11 +9,11 @@ class DepPrioritySatisfiedRange(object): > not satisfied and buildtime HARD > not satisfied and runtime 7 MEDIUM > not satisfied and runtime_post 6 MEDIUM_SOFT > - satisfied and buildtime_slot_op 5 SOFT > - satisfied and buildtime 4 SOFT > - satisfied and runtime 3 SOFT > - satisfied and runtime_post 2 SOFT > - optional 1 SOFT > + optional 5 SOFT > + satisfied and buildtime_slot_op 4 SOFT > + satisfied and buildtime 3 SOFT > + satisfied and runtime 2 SOFT > + satisfied and runtime_post 1 SOFT > (none of the above) 0 NONE > """ > MEDIUM = 7
Actually, it already drops the "optional" dependencies earlier, since they come immediately after None here: > DepPrioritySatisfiedRange.ignore_priority = ( > None, > DepPrioritySatisfiedRange._ignore_optional,