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

Bug 387475

Summary: emerge --autounmask-write changes to config files
Product: Gentoo Linux Reporter: Vladimir Berezhnoy <non7top>
Component: Current packagesAssignee: Portage team <dev-portage>
Status: RESOLVED INVALID    
Severity: enhancement    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 376695    

Description Vladimir Berezhnoy 2011-10-17 22:39:59 UTC
If /etc/portage/package.[keywords,unmask] are directories emerge writes to last file. It should be more verbose about which file it will modify.
Also it would be better if there was some specific file dedicated for emerge, like 'emerge-${PN}' or 'emerge'. In my case the files are:

5) /etc/portage/package.keywords/autounmask-youtube-dl (1)
6) /etc/portage/package.unmask/autounmask-youtube-dl (1)



Reproducible: Always
Comment 1 Sebastian Luther (few) 2011-10-18 14:35:52 UTC
Well, the man page says this already.

The problem is that there might be conflicting entries for a package in those files. The only way for emerge to ensure that the new changes take precedence is to write to the last file.

If you want a file specifically for emerge you could add a 99-emerge-autounmask file for example.
Comment 2 Vladimir Berezhnoy 2011-10-18 15:51:16 UTC
I see now the point of the 'last file' thing, but... The first thing I thought was to add 99-emerge, but emerge uses different sort method so as a result it will still prefer "autounmask-youtube-dl" before "99-emerge" (may be this is a bug). Anyway having "zzzzz-emerge" in my /etc/portage/package.*/ dirs looks ugly.

Other option which will work is adding FEATRURES="split-autounmask" that will turn on using split config files. Such approach was used by autounmask for a couple of years already and worked pretty well.
Comment 3 Zac Medico gentoo-dev 2011-10-18 17:02:46 UTC
(In reply to comment #2)
> I see now the point of the 'last file' thing, but... The first thing I thought
> was to add 99-emerge, but emerge uses different sort method so as a result it
> will still prefer "autounmask-youtube-dl" before "99-emerge" (may be this is a
> bug). Anyway having "zzzzz-emerge" in my /etc/portage/package.*/ dirs looks
> ugly.

It's not a but. You should use something like "00-autounmask-youtube-dl" instead of "autounmask-youtube-dl".
Comment 4 Sebastian Luther (few) 2011-10-18 19:50:45 UTC
(In reply to comment #2)
> I see now the point of the 'last file' thing, but... The first thing I thought
> was to add 99-emerge, but emerge uses different sort method so as a result it
> will still prefer "autounmask-youtube-dl" before "99-emerge" (may be this is a
> bug). Anyway having "zzzzz-emerge" in my /etc/portage/package.*/ dirs looks
> ugly.
Right, 99- works only if all files start with numbers. It uses a lexicographic sort.

> 
> Other option which will work is adding FEATRURES="split-autounmask" that will
> turn on using split config files. Such approach was used by autounmask for a
> couple of years already and worked pretty well.

Well, if someone can propose something that works better and ensures that the new setting takes precedence, I'd happy to here it.

One more thing to consider is that emerge's --autounmask doesn't only work for a single package. You can even get changes for emerge -uDN world. What would the file name be then? Or do you propose to use one file per package?
Comment 5 Vladimir Berezhnoy 2011-10-19 23:35:15 UTC
Thanks for explaining this. It looks it's just me who is used to a different behavior, but the way emerge does it is more reasonable. Consider the bug as invalid.