Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 513750 - Conditional USE flag defaults based on other USE flags (non-mandatory equivalent of REQUIRED_USE)
Summary: Conditional USE flag defaults based on other USE flags (non-mandatory equival...
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All All
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-18 23:01 UTC by Josh Triplett
Modified: 2024-01-19 22:50 UTC (History)
1 user (show)

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 Josh Triplett 2014-06-18 23:01:44 UTC
REQUIRED_USE allows specifying that one USE flag depends on another; however, that only allows hard dependencies.  I'd like a way to have one USE flag enable or disable another by default, while still allowing an explicitly specified value to override that default.  For instance (strawman syntax proposal):

IUSE="flag1 +flag2"
DEFAULT_USE="flag1? ( -flag2 )"

By default, this package would build with -flag1 +flag2.  If the user explicitly enables flag1, but does not specify a value for flag2, the package would build with +flag1 -flag2.  However, the user can still explicitly enable both flag1 and flag2 if they want, or for that matter disable both.

This would come in handy for some ebuilds in Chrome OS.  In particular, some global USE flags are used for specific target environments (such as embedded, or target graphics stacks), and those global USE flags should affect the defaults for certain package-specific USE flags, without preventing the user from overriding those defaults.