Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 405297 - --autounmask-write should write to a default file(name) in /etc/portage/package.*/
Summary: --autounmask-write should write to a default file(name) in /etc/portage/packa...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 565564 (view as bug list)
Depends on:
Blocks: autounmask
  Show dependency tree
 
Reported: 2012-02-22 16:23 UTC by Jeroen Roovers (RETIRED)
Modified: 2016-11-30 19:59 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2012-02-22 16:23:39 UTC
Right now --autounmask-write likes to pick an apparently random file in /etc/portage/package.*/ to write changes to, like

/etc/portage/package.keywords/cross-i686-pc-linux-gnu

In my case, that directory contains filenames based on either bug numbers, whatever crossdev uses, or something I can remember a purpose for, and one generic "0" file for defaults on a particular system, so the contents of that directory could look like this:

0        (local system defaults)
377199   (testing unstable packages for a specific bug)
cross-hppa2.0-unknown-linux-gnu
cross-hppa64-unknown-linux-gnu
cross-i686-pc-linux-gnu
         (all three files created by crossdev)

dmalloc  (in package.use/ , set USE flag for specific packages to pull in
          dev-libs/dmalloc)


Writing to just any file it finds is probably undesirable in most use cases, and instead it should probably pick something generic and unique, like "sys-apps-portage-autounmask", instead.
Comment 1 Zac Medico gentoo-dev 2012-02-22 17:00:42 UTC
It's not random. It's explained in the emerge man page since bug 370697:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=424f8f8d6587f015e074e3e915746929a990a52f
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-02-22 17:18:21 UTC
(In reply to comment #1)
> It's not random. It's explained in the emerge man page since bug 370697:

I'm sorry I used that word, but I did say "apparently random".

> http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=424f8f8d6587f015e074e3e915746929a990a52f

Couldn't emerge better make sure it's the last file by creating it?

`zzzzz-autounmask' perhaps? Or even `ZZZZZ-autounmask'?
Comment 3 Zac Medico gentoo-dev 2012-02-22 17:22:10 UTC
(In reply to comment #2)
> Couldn't emerge better make sure it's the last file by creating it?
> 
> `zzzzz-autounmask' perhaps? Or even `ZZZZZ-autounmask'?

I guess that could work. It has the disadvantage of forcing on the user a certain way of naming the files, though.
Comment 4 Sebastian Luther (few) 2012-02-22 18:33:13 UTC
You could add a file with a name that ensures that it is always the last one given your naming scheme and leave this file for portage.
Comment 5 Zac Medico gentoo-dev 2015-11-12 17:02:48 UTC
*** Bug 565564 has been marked as a duplicate of this bug. ***
Comment 6 Nathan Shearer 2016-11-30 18:27:20 UTC
The current stage3 files ship with /etc/portage/package.use/iputils and autounmask likes to append changes to that file.

New users might not immediately realize that all their changes are in the iputils file so can the empty zzzz-autounmask file be created as a default from now on?

I've been creating /etc/portage/package.use/zzzz-autounmask for a long time now and it works very well.
Comment 7 Zac Medico gentoo-dev 2016-11-30 19:40:06 UTC
(In reply to Nathan Shearer from comment #6)
> The current stage3 files ship with /etc/portage/package.use/iputils and
> autounmask likes to append changes to that file.
> 
> New users might not immediately realize that all their changes are in the
> iputils file so can the empty zzzz-autounmask file be created as a default
> from now on?
> 
> I've been creating /etc/portage/package.use/zzzz-autounmask for a long time
> now and it works very well.

If we create it unconditionally, then it might interfere with whatever convention the user has chosen. For example, then might have numbered all of their files, and they've been using 9999-autounmask instead.
Comment 8 Brian Dolbec (RETIRED) gentoo-dev 2016-11-30 19:59:00 UTC
Please see bug 598116

I also have working code in my SpecialFilename branch which has been tested.  It could be modified to use a make.conf setting which a user could override the make.conf.defaults.

https://github.com/dol-sen/portage-1/commit/c4a61bebca1cfeb0833cefb2c64be6156bdb8e8d

Keep in mind, this code currently only kicks in if there are no files in the directory.