Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 25940 - USE dependancies should be inherited by packages
Summary: USE dependancies should be inherited by packages
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-05 03:03 UTC by Sean E Russell
Modified: 2005-02-28 03:52 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean E Russell 2003-08-05 03:03:48 UTC
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.
Comment 1 SpanKY gentoo-dev 2003-08-05 09:46:06 UTC
this is already filed somewhere ... when i can find the original bug ill make this a dup
Comment 2 Brian Harring (RETIRED) gentoo-dev 2005-02-27 23:08:47 UTC
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 :)
Comment 3 Sean E Russell 2005-02-28 03:52:23 UTC
> 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