We'd like to be able to have people set VIDEO_CARDS to pull in their specific video card drivers, and the same for INPUT_DEVICES and their input driver. If either variable remains unset, we want to install all possible drivers. This means that USE_EXPAND flags are directly affecting the dependency list, andif none of the sequence of all drivers is set, then we want to automatically pull in all drivers. Example: || ( list of all drivers ( video_cards_foo? ( foo ) video_cards_bar? ( bar ) ) ) But if VIDEO_CARDS is unset, this allows the second part of the || to fulfill the dependency by being empty, instead of installing all drivers as we want. There is no way in dependency lists to check whether VIDEO_CARDS is empty without checking every possible value VIDEO_CARDS could hold. So instead of "list of all drivers" above, we would require: !video_cards_foo? ( !video_cards_bar? ( ... !video_cards_N? ( list of drivers ) This is a huge hack, and it would be much more convenient to have a way to checkwhether VIDEO_CARDS was set via portage, e.g. the main video_cards flag: video_cards? ( video_cards_foo? video_cards_bar? ) !video_cards? ( list of all drivers ) This also raises the possibility of "invalid" VIDEO_CARDS settings, i.e. ones that have no effect in this ebuild. But as at least a temporary measure, this could be checked in pkg_setup() against some variable containing all "valid" settings. Traditionally, I have used IUSE_${USE_EXPAND_NAME} to hold all "valid"settings. So the real concern is being able to check in a dependency-friendly way whether a USE_EXPAND variable is set.
To clarify, the suggested USE flag to indicate that VIDEO_CARDS is set would be video_cards. If that seems too prone to conflict, it could be expand_video_cards, use_expand_video_cards, or whatever.
Created attachment 72138 [details, diff] Adds extra USE flags if a specific USE EXPAND deal is EXPANDED Basically if something in use expand is expanded, add the USE_EXPAND string to USE. For example, if USE_EXPAND="VIDEO_CARDS" and VIDEO_CARDS="nvidia" then USE will contain both "video_cards" and "video_cards_nvidia"
I'd rather not slip another use flag in here. Use a bash func that scans the contents of use looking for the USE_EXPAND prefix; why? A) it works _now_ B) we're not polluting the USE namespace any further C) we can rebind that function to something sane down the line, rather then the heavier scanning route.
meh, my comments are strictly non metadata related- obviously doesn't fly in DEPEND.
As discussed on irc use the fixed || () deps.