Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 88613 - command-line tool to unmask packages
Summary: command-line tool to unmask packages
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 126404 (view as bug list)
Depends on:
Blocks: 155723
  Show dependency tree
 
Reported: 2005-04-10 10:41 UTC by Jean-François Richard
Modified: 2007-06-06 00:27 UTC (History)
1 user (show)

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


Attachments
HEre is one that works for x86 (lazy.sh,105 bytes, text/plain)
2005-04-10 10:57 UTC, Alec Warner (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-François Richard 2005-04-10 10:41:18 UTC
It would be nice to have a simple way to unmask packages directly on the command-line, much like "euse".

Current situation :

emerge package
-- package is masked
nano /etc/portage/package.keywords
  paste package name, add ~x86, or -*

[same with nano -w /etc/portage/package.unmask]

[loop for each dependencies]


Enhancement :

emerge package 
-- package is masked
unmask package    -takes care of arch and which /etc/portage/ files to modify
emerge package

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.



Reproducible: Always
Steps to Reproduce:
Comment 1 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-04-10 10:57:03 UTC
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
Comment 2 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-04-10 10:57:48 UTC
Created attachment 55899 [details]
HEre is one that works for x86
Comment 3 Jean-François Richard 2005-04-10 11:11:48 UTC
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?  ;)
Comment 4 Jean-François Richard 2005-04-10 11:28:44 UTC
forgot :

- 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 
       package.keywords

   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    
emerge e

-- versionned unmasking :
unmask -D '=category/package-1.0'
emerge package

unmask --lastest-only -D beagle
emerge beagle

Comment 5 Jason Stubbs (RETIRED) gentoo-dev 2005-04-11 05:57:22 UTC
"It'd be nice if..." usually doesn't go anywhere.
Comment 6 Jean-François Richard 2005-04-11 06:39:17 UTC
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.
Comment 7 Jason Stubbs (RETIRED) gentoo-dev 2005-04-11 06:46:20 UTC
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.
Comment 8 SpanKY gentoo-dev 2006-03-16 07:21:46 UTC
*** Bug 126404 has been marked as a duplicate of this bug. ***
Comment 9 Mathias Hasselmann 2006-03-16 07:30:07 UTC
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.
Comment 10 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 14:52:38 UTC
Reopening for consideration
Comment 11 Zac Medico gentoo-dev 2007-04-27 00:43:15 UTC
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.
Comment 12 Marius Mauch (RETIRED) gentoo-dev 2007-06-06 00:27:59 UTC
Closing as the actual issue of this report is solved per comment #11, the API part isn't really covered by it.