On 12 February 2016 at 02:54, NP-Hardass <np-hard...@gentoo.org> wrote: > Just a slightly OT side note...
Quite, these are the *sorts* of things I've been mulling over for a bit without coming to a concrete implementation idea. > I split mine off into a separate file (using a directory for package.use > ). > I proposed a feature a while back, > https://bugs.gentoo.org/show_bug.cgi?id=534548, where all use flags > are stored in /etc/portage/package.use/${USE_EXPAND} to help with > management. My experience so far has been similar, in that clustering settings based on the setting tends to be a good primary classifier. Though I maintain 2 different layout structures depending on task: Scheme 1 I use for package.use and keywords and stuff: package.use/01-${cat} # contains use settings for all packages in ${cat} package.use/90-${task} # contains all settings for use flags that achieve a single "task" ( like I have an entire file just for the legacy abi_x86_32 support ) package.use/99-autounmask # because auto-unmask writes to the last file alphabetically, so garbage goes in here if I ever make the mistake of using autounmask-write again Scheme 2 I use for package.env package.env/${task}/${pn} Where "$task" is as above, but "${pn}" is the program-in-world-I-want, and the file contains settings that achieve "task" for its dependencies. This is me trying to approximate a "Lazy" graph, as each entry named "${pn}" says: <=cat/pn-$version py2.7 # deps cat/pn py2.7 cat/pn py2.7 That way, every time an update to ${pn} happens where it still needs the old python, it cries about it, but in the future it will be trivial to check "packages I have installed" vs "lazy rule files I have" and see when the condition is no longer required, and I can simply reap the whole file. ( This is kinda hell because of all the overlapping dependencies, but its better than nothing ) > Yet another feature similar to lazy eval of use flags is another bug I > created a while back, recommended and conditional use flags > https://bugs.gentoo.org/show_bug.cgi?id=539124. recommended I wanted too, but I figured it would be easy enough to bodge around it with: IUSE="minimal suggested feature" DEPEND="!minimal? ( feature_dep ) feature? ( feature_dep ) " Or something like that. ( using the word "minimal" as a stand in for "don't pull recommended stuff" because that's already a global useflag, and under the assumption that the words "recommended" implies "Installed by default" ) But in the feature as stated, there's a bit of a gap conceptually, because sometimes upstream produce a set of dependencies with no description other than "these are all recommended deps and you should have all of them, unless you're working in very constrained circumstances and you know what you're doing, and things may break in certain code paths if you don't install them", and "RECOMMENDED_USE" here doesn't exactly cover that featureset. You'd still need an explicit "minimal" for that. Conditional I kinda thought about and decided "naah, too complex, you'll blow any resolver up with that stuff" . Though we may be wanting different things entirely in "recommended useflags", because I'm riffing more on "recommended dependencies" which may incidentally be "dependencies required by this package if a certain package is to use it", and the only way to communicate that between packages at present is with "cat-egory/pakc-1.2[-minimal]" -- Kent KENTNL - https://metacpan.org/author/KENTNL