Portage already supports granular dependancies; there are weak dependancies (uses) and strong dependancies (requires). Weak dependancies should be inherited when calculating the dependancy tree. That is, if W <uses> X <requires> Y <requires> Z, and Z is disabled (USE="-Z"), then a weak "do not use" attribute should be inherited by X (through Y), and emerging W should not recursively install Z. I say "weak" because if W <requires> X ... Z, then of course Z must be installed along with W. However, when link in that chain of dependancies is connected by a weak dependancy ("uses") and something further down the line is turned off, then the inclusion should stop at that dependancy. Example: Currently, ffmpeg USES arts, which REQUIRES KDE, which REQUIRES QT and X11. If any of -X, -qt, or -kde exist in the USE variable, but arts is not, and installing ffmpeg will also install X, kde, and qt. In this case, I think the most logical behavior would be for ffmpeg to install without triggering the install of arts.
this is already filed somewhere ... when i can find the original bug ill make this a dup
use flags control optional dependencies... if you (via a conscious choice of flipping a flag on) pull in a set of packages, its your doing. In other words, if you pull in xorg via other choices, there is no reason -X should prevent it from coming in. -X ~= conditional yes/no for ebuilds, portage doesn't know, nor should it know that the convention for the use flag X ~= virtual/x11. Meanwhile, just use package.mask if it's really annoying ya :)
> if you (via a conscious choice of flipping a flag on) You don't understand what I'm saying. If I specify -X and -kde, but I *forget* to specify -arts (that is, I *don't* specify the arts flag one way or the other), and I pull ffmpeg, then arts is "assumed" to be on even if it isn't required, and X and kde are also installed even though they are disabled. I'm not turning on the flag. The flag is being assumed, despite the fact that other flags are disabled. Look, this is simple logic. A flag can have three values: on, off, and unspecified. I'm saying that if a flag has dependencies on other flags, and its value is unspecified, then it should *not* override flags that *are* specified. --- SER