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

Bug 480762

Summary: [Future EAPI] USE-flag groups/sets
Product: Gentoo Hosted Projects Reporter: Manuel Rüger (RETIRED) <mrueg>
Component: PMS/EAPIAssignee: PMS/EAPI <pms>
Status: CONFIRMED ---    
Severity: normal CC: esigra, tsmksubc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://www.gentoo.org/proj/en/glep/glep-0029.html
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 174380    

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.

Features:
- 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.


Example:
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.