Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 480762 - [Future EAPI] USE-flag groups/sets
Summary: [Future EAPI] USE-flag groups/sets
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PMS/EAPI
Depends on:
Blocks: future-eapi
  Show dependency tree
Reported: 2013-08-12 17:47 UTC by Manuel Rüger (RETIRED)
Modified: 2016-10-15 20:26 UTC (History)
2 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Rüger (RETIRED) gentoo-dev 2013-08-12 17:47:10 UTC
Objective: Possibility to group USE-flags as it is already possible with licenses.

- Add $PORTDIR/profiles/use_groups with the same syntax as already available in license_groups
- Allow the user to define own useflag groups and overwrite existing ones in /etc/profiles/use_groups
- emerge --list-use-sets should list all existing useflag sets through parsing the abovementioned files.

Developer defines USE-flag set all_codecs in $PORTDIR/profiles/use_groups. This consists of all video/audio codecs available via a USE-Flag.
A possible set could be: @all_codecs = mp3 mp4 xvid speex
User adds "@all_codecs" to USE in /etc/portage/make.conf. 
A new codec is available via USE-flag (e.g. opus), developer adds it to the USE-flag group. The user gets the update with the next sync and can re-emerge the packages with the changed USE-flag without caring about this single USE-flag at all.

This is an advantage for users, who don't care about micro-managed USE-flags (or don't care about it in codecs e.g.), but want to be able to use sane defaults. 
We could also solve this via profiles, but profiles should tend to stay minimal. So they suit to a huge amout of users. Another possibility is to use IUSE_EXPAND and add e.g. a codec prefix, so users can use USE="codec_*", but this has to be done in every ebuild, while this solution is centralized. 
I also hope most of the code can be copied over from the already existing LICENSE groups.