Summary: | Organization and improved handling of package.use as a directory | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Adam Feldman <np-hardass> |
Component: | Enhancement/Feature Requests | Assignee: | Portage team <dev-portage> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=405297 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Adam Feldman
2015-01-04 01:03:49 UTC
Current behavior has a rationale: `man emerge`: "--autounmask-write [ y | n ] If --autounmask is enabled, changes are written to config files, respecting CONFIG_PROTECT and --ask. If the corresponding package.* is a file, the changes are appended to it, if it is a directory, changes are written to the lexicographically last file. This way it is always ensured that the new changes take precedence over existing changes." I suggest that you manually edit /etc/portage/package.use in a way preferred by you. (In reply to Arfrever Frehtes Taifersar Arahesis from comment #1) > Current behavior has a rationale: > `man emerge`: > "--autounmask-write [ y | n ] > If --autounmask is enabled, changes are written to config files, respecting > CONFIG_PROTECT and --ask. If the corresponding package.* is a file, the > changes are appended to it, if it is a directory, changes are written to > the lexicographically last file. This way it is always ensured that the > new changes take precedence over existing changes." > > I suggest that you manually edit /etc/portage/package.use in a way preferred > by you. Right, so in this case (just considering the USE_EXPAND case), let's consider two classes of changes, USE_EXPAND related ones, and non-USE_EXPAND related ones: USE_EXPAND: These would be written to their USE_EXPAND file, so the concern of another file overriding it only happens if the user manually adds a USE_EXPAND entry to another file that is lexographically after the name of the USE_EXPAND non-USE_EXPAND: These would be written to the lexographically last file, ensuring the current behavior persists. Now, let's look at the additional rule that I proposed (which isn't necessary, but makes the USE_EXPAND situation a little cleaner), this basically would do the following: for writing, would be modified to: if [ -z "${DEFAULT_PKG_USE_FILE}" ] ; then write to ${DEFAULT_PKG_USE_FILE} else write to lexographically last file fi and parsing, would be modified to: parse lexographically if [ -z "${DEFAULT_PKG_USE_FILE}" ] ; then parse ${DEFAULT_PKG_USE_FILE} fi s/lexographically/lexicographically/g |