Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 128123

Summary: dependency on package compiled with specific use flags
Product: Portage Development Reporter: Will Simoneau <simoneau>
Component: Core - DependenciesAssignee: Portage team <dev-portage>
Status: RESOLVED DUPLICATE    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Will Simoneau 2006-03-30 09:14:07 UTC
It would be nice if portage had a way for ebuilds to specify that a dependent package needs to be merged with a certain combination of USE flags set/unset. Maybe something like this in foo.ebuild:

RDEPEND="USE='bar' sys-apps/baz"

(I'm just using this syntax as an example and not necessarily trying to show that it is a good idea; I'm just trying to explain how this feature should work.)

The idea is that at dependency resolution time, we should be able to remerge dependent packages if they need a different set of USE flags than are currently set in make.conf or than those which are currently compiled in. In this example, we should see that if baz is not installed and the 'bar' USE flag has not been explicitly set, emerging foo should compile baz with USE=bar set. If baz is already installed with USE=-bar, emerging foo should first recompile baz with USE=bar. If USE=-baz has explicitly been set in make.conf (or package.use, or ...), we should generate a blocker situation and refuse to merge anything. The reverse of the above should also be true if foo depended on sys-apps/baz with USE=-bar.

This feature would solve many USE-dependency nightmares. Try emerging horde-chora on a system that doesn't have php installed and has a minimal set of USE flags, and you find that many of the PEAR packages chora depends on require various USE flags to be set on dev-lang/php. Every time one PEAR module merges, the next requires yet another set of USE flags to be enabled and php remerged (!), resulting in USE-flag Dependency Hell(tm).

Chora is not the only example of this in portage, but it is the one that got me thinking about this idea (so please don't just say that this particular set of ebuilds is broken). This feature would be a *really* nice thing to have.
Comment 1 SpanKY gentoo-dev 2006-03-30 10:51:00 UTC

*** This bug has been marked as a duplicate of 2272 ***