Portpeek
Portpeek is a script for Gentoo users to use to determine if packages the user has in package.keyword or package.unmask have gone stable and can be removed. The script can also remove these unneeded packages automatically. There is an ebuild available from Gentoo’s portage system.
Screen shot:

Latest Release: 1.8.0
05/14/09
Packaged Masked
Portpeek will now handle the tilde in the package.* files.
It will look for a package > the indicated package and remove
the line if a stabled version is detected. Please backup your files
before trying this feature
04/17/09
Portpeek now shows file information where line was found
Source Download Link (script and man page)
08/29/08
Fixed bug when determining if package is masked
06/26/2008
Remove the use of deprecated portage python modules.
10/10/2007
Packages without atoms (=<>) will not display as stable as this program is intended for managing version specific lines in package.mask and package.keywords
08/02/2007
Fixed a bug where commented lines were removed when they matched a package being removed.
2/18/2007
This version has the ability to turn off the color output.
You guys do a wonderful job! Keep up the good work!!!s
[...] Gentoo Firefox Toolbar [...]
[...] Gentoo Firefox Toolbar [...]
Is it possible to support dirs in /etc/portage? (/etc/portage/{package.unmask,package.mask,package.use}/)
>Is it possible to support dirs in /etc/portage? (/etc/portage
>/{package.unmask,package.mask,package.use}/)
It does support the dirs, are you seeing a situation where it’s not traversing into the directories?
I’m not sure Is it really related to portpeek but all my files in /etc/portage has been deleted.
I’ll test it again.
err… Sorry it’s my fault. I manually removed the entire directory by accident.
Really nice tool, thanks
[...] Portpeek ist ein kleines Skript für Gentoo-Benutzer, das die package.keywords und die package.unmask von nicht mehr benötigten Einträgen bereinigt. Es überprüft ob die entsprechenden Programme bzw. Versionen mittlerweile als stabil gekennzeichnet sind und entfernt die entsprechenden Einträge. [...]
Could you please add ‘~’ to the list of acceptable atom types. It is quite similar to ‘=’.
Here’s why I don’t think ~ will work.
Let’s say a user has this:
~kde-base/kdelibs-4.2.1
Which means he wants every -rX release keyworded for installation.
So now let’s say kdelibs-4.2.1-r3 goes stable.
Do we remove his line? What if user wants to stay on top of 4.2.1 releases no matter what so when keyworded kdelibs-4.2.1-r4 comes out, he gets it.
Please elaborate your thoughts if you think I am completely off base here.
1. Great program, my package.keywords would get really messy without it.
2. For ~, it would be good to at least have an option – what if all the -r packages are stable and you still have it in package.keywords (the test should be whether there is a currently installed package that would be masked without that line – true, they might use it so it will update when there’s a new -r, but it’s a weird thing to want if one of them is already stable)
3. Feature request: for folks using package.* sub-directories, could you have it print which file the line in questions is in? Also, have it delete that file if it removes the last line (optional).
4. Bug report: It doesn’t seem to handle packages with blank keywords – I have a line in package.keywords that says x11-plugins/gkacpi * because the package doesn’t have any keywords, but it gets reported in portpeek -ar.
@Eitan – new version (1.7.5) adds filename information
I added x11-plugins/gkacpi * but I don’t see it coming up as a problem. Can you open a bug on bugzilla if this is still a problem?
[...] Gentoo Firefox Toolbar [...]
portpeek is fantastic!
any chance to get it to cooperate with paludis? the files in /etc/paludis look very much like the original portage equivalents, so i guess it wouldn’t be terribly complicated to port it, but this is just a wild guess.
anyway, that’d be highly appreciated.
@Nico
Thanks for the kind words.
Could you email me your paludis files? I’ve never seen them before and would like to take a look.
mpagano at gentoo.org
Hi Mike,
portpeek is really very useful… Nice work! I hope to see the latest version in stable as soon as possible.
Just a little request: could you add back the no-color option? I use portpeek in a cron script, and those ANSI codes reduce the readability of the output messages.
Thanks,
Stefano
@Stefano
Thanks for the nice comments.
Color suppression added to portpeek-1.8.1
Hi
I am missing some functionality. I am using directories which portpeek does not read. It would be a nice feature.
# pwd && ls -lR
/etc/portage
.:
total 0
drwxr-xr-x 2 root root 72 Jul 22 08:24 package.keywords
drwxr-xr-x 2 root root 104 Aug 15 14:43 package.use
./package.keywords:
total 4
-rw-r–r– 1 root root 47 Jul 22 08:39 vlc
./package.use:
total 8
-rw-r–r– 1 root root 59 Jul 28 20:50 mediatomb
-rw-r–r– 1 root root 178 Jul 22 09:57 vlc
I was wondering if you’ve had any progress with paludis support? I could sent you my sample files if you like.
@Dave
I’m sorry. I don’t use paludis.