It would be nice to have a simple way to unmask packages directly on the command-line, much like "euse".
Current situation :
-- package is masked
paste package name, add ~x86, or -*
[same with nano -w /etc/portage/package.unmask]
[loop for each dependencies]
-- package is masked
unmask package -takes care of arch and which /etc/portage/ files to modify
The unmask tool could also use a "-D" option to go deep and unmask packages that are dependencies to the one the user wants to unmask.
Maybe some people use "echo >>" instead, which is almost the same...
In fact, it is quite simple to do "echo", but much more pleasant to use a command-line tool (again, like euse).
Just tought about this while trying to emerge a mono app which needs tons of masked packages... think of e17 too.
Steps to Reproduce:
echo "=category/package-version ~arch" >> /etc/portage/package.keywords &&
echo ">=category/package-version" >> /etc/portage/package.unmask
A little lazy aren't we? A bash script here would take like...2 lines
Created attachment 55899 [details]
HEre is one that works for x86
What still needs to be done :
- Unmask the masked deps (maybe using the python API, which I am not familiar
with) if the user specifies something like "-D"
- set the category automatically if not ambiguous
- set the arch from the current profile
A little lazy, aren't we? ;)
- not cluttering package.unmask if not necessary (same for .keywords)
- be sure to not add twice the same thing in both of these files
- About version information, just some ideas :
if "unmask e" then add "x11-wm/e" to package.keywords
if "unmask --latest-only e" the add "=x11-wm/e-greatest-masked-version" to
if using the "-D" option with --latest-only, would also add versioned
packages for every masked deps
else it would add unversioned ones.
^^^^ any other ideas about these schemes?
Usage scenarios :
-- unversionned unmasking :
unmask -D e
-- versionned unmasking :
unmask -D '=category/package-1.0'
unmask --lastest-only -D beagle
"It'd be nice if..." usually doesn't go anywhere.
I'm sorry if my bug report feels "rude", I would like to contribute real code to this, but as told before, I am not quite familiar with the Portage API. Is there some portage API "starter" documentation somewhere?
Also I was wondering if gentoo users/devs would find this actually useful or if this whole idea is just lame.
I didn't find you rude. I don't think it's a bad idea either. Others including myself have talked about doing it. I'm just saying that having an open bug about it doesn't really help anything but rather obscures the many other bugs.
Unfortunately, there is no strong API for portage as yet. The best place to start would probably be looking at other tools.
*** Bug 126404 has been marked as a duplicate of this bug. ***
Bug 126404 is not excactly a duplicate, as the script provided there provides sanity checking for package.keywords and removal of packages from that file.
Reopening for consideration
There is now a program (written in perl) called app-portage/autounmask that does this task. However, I'm still planning to have portage api support for this type of task as part of the new dependency resolver that I'm currently working on.
Closing as the actual issue of this report is solved per comment #11, the API part isn't really covered by it.