Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Script to add packages to package.keywords and package.unmas
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
DanielM
n00b
n00b


Joined: 21 Sep 2003
Posts: 34
Location: Adelaide

PostPosted: Sun Dec 19, 2004 8:05 am    Post subject: Script to add packages to package.keywords and package.unmas Reply with quote

So, I've spent the last who knows how long adding packages to /etc/portage/package.keywords and /etc/portage/package.unmask by hand.

I finally got around to writing this. It's not wonderful, but it DOES IT'S JOB (for me). Any tips, ideas, etc are more than welcome.

USAGE:

[root@madmax][/usr/portage] # unmask.py net-www/mozilla-firefox
Unmasked net-www/mozilla-firefox with keyword: ~x86

or:

[root@madmax][/usr/portage] # unmask.py net-www/mozilla-firefox sys-kernel/ck-sources
Unmasked net-www/mozilla-firefox with keyword: ~x86
Unmasked sys-kernel/ck-sources with keyword: ~x86

Or, if you messed something up:

[root@madmax][/usr/portage] # unmask.py bad-package/oops
Unmasked bad-package/oops with keyword: ~x86
[root@madmax][/usr/portage] # unmask.py undo
Deleted bad-package/oops ~x86 from /etc/portage/package.keywords
Deleted bad-package/oops from /etc/portage/package.unmask

Maybe it'll be of use to someone. :)

unmask.py
_________________
MadMax - Displaced Aussie
Back to top
View user's profile Send private message
hensan
l33t
l33t


Joined: 26 Jun 2003
Posts: 868
Location: Sweden

PostPosted: Sun Dec 19, 2004 12:07 pm    Post subject: Reply with quote

Nice. Kind of primitive, but nice :)

Some ideas:

- Check portage, so that bla-bla/foobar actually exists before unmasking it.
- Make it so you only have to give the package name, not category/package.
- You only have to add stuff to package.unmask if the package is hardmasked. Now it does it all the time.
- Allow to user to specify the keyword, so they can unmask -arch packages as well.
- Maybe a more advanced undo, like unmask.py undo <package>, instead of just removing the last package added.
- Get the arch from portage or make.conf, instead of a hardcoded ~x86.

...there, that ought to keep you busy for a while :)
Back to top
View user's profile Send private message
ian!
Bodhisattva
Bodhisattva


Joined: 25 Feb 2003
Posts: 3829
Location: Essen, Germany

PostPosted: Mon Dec 20, 2004 3:14 pm    Post subject: Reply with quote

Moved from 'Gentoo Chat'.
_________________
"To have a successful open source project, you need to be at least somewhat successful at getting along with people." -- Daniel Robbins
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum