Due to the need for myself and a friend/co-worker, we came up with a script (`unmask' on my system, or `mask-update` on my friend's) to merge a special $PORTDIR_OVERLAY/profiles/package.mask file with the main $PORTDIR/profiles/package.mask. It allows you add new masks, or various items to unmask. It requires perl, PORTDIR_OVERLAY enabled, and a $PORTDIR_OVERLAY/profiles/package.mask file. It allows you to run it as a user, if sudo is available, otherwise it gives an error about requiring root access. Either similar functionality could be built into portage, or this could be distributed with gentoolkit. Reproducible: Always Steps to Reproduce:
Created attachment 9672 [details] Unmask script
Created attachment 9673 [details] Sample PORTDIR_OVERLAY profiles/package.mask file This is my sample package.mask OVERLAY file. It allows to you specify a ! in front of the line to indicate versions that should be commented out of the package.mask file. As an example, this: !>=sys-apps/baselayout-1.8.6.0 ends up commenting out 5 lines (=1.8.6.0 through =1.8.6.4) from the package.mask file, as would be expected.
Created attachment 9745 [details] Updated unmask script Updated the unmask script, rearranged a bit of the code, added a few comments, and made it use '/usr/lib/portage/bin/portageq' instead of 'emerge info'.
I'd like to see this make it into portage or the gentoolkit. It's very useful.
add in latest 2.0.48-pre's: /etc/portage/package.unmask
If I understand correctly, it only allows you to remove masks, not _add_ them, which is half of what this bug is about.
touche add in latest 2.0.48-pre's: /etc/portage/package.mask ;)