Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 118663 - portpeek: Displays user unmasked ebuilds and installable options from the portage tree
Summary: portpeek: Displays user unmasked ebuilds and installable options from the por...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL: http://www.mpagano.com/blog/?page_id=3
Whiteboard: [sunrise-overlay]
Keywords: EBUILD, InOverlay
Depends on:
Blocks:
 
Reported: 2006-01-11 07:13 UTC by Mike Pagano
Modified: 2007-10-10 14:46 UTC (History)
4 users (show)

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


Attachments
portpeek script to query against user unmasked packages (portpeek,4.47 KB, text/plain)
2006-01-11 07:14 UTC, Mike Pagano
Details
portpeek script to query against user unmasked packages (portpeek,4.97 KB, application/octet-stream)
2006-02-01 16:10 UTC, Mike Pagano
Details
script to help manage package.keywords,unmask and mask (portpeek,5.87 KB, application/octet-stream)
2006-02-01 17:57 UTC, Mike Pagano
Details
script to help manage package.keywords,unmask and mask (portpeek,6.44 KB, application/octet-stream)
2006-02-02 11:07 UTC, Mike Pagano
Details
script to help manage package.keywords,unmask and mask (portpeek,7.50 KB, application/octet-stream)
2006-02-02 17:27 UTC, Mike Pagano
Details
script to help manage package.keywords,unmask and mask (portpeek,7.54 KB, application/octet-stream)
2006-02-03 09:52 UTC, Mike Pagano
Details
script to help manage package.keywords,unmask and mask (portpeek,7.74 KB, application/octet-stream)
2006-02-04 12:04 UTC, Mike Pagano
Details
new script version 0.0.5 (portpeek,7.74 KB, application/octet-stream)
2006-02-04 14:52 UTC, Mike Pagano
Details
new script version 0.0.6 (portpeek,7.86 KB, application/octet-stream)
2006-02-06 05:17 UTC, Mike Pagano
Details
new script version 0.0.7 (portpeek,7.88 KB, application/octet-stream)
2006-02-06 09:27 UTC, Mike Pagano
Details
new script version 0.0.8 (portpeek,7.95 KB, application/octet-stream)
2006-02-07 10:00 UTC, Mike Pagano
Details
new script version 0.0.9 (portpeek,8.55 KB, application/octet-stream)
2006-02-14 05:40 UTC, Mike Pagano
Details
new script version 0.1.0 (portpeek,9.10 KB, application/octet-stream)
2006-03-06 08:50 UTC, Mike Pagano
Details
new script version 0.1.1 (portpeek,10.14 KB, application/octet-stream)
2006-03-06 13:53 UTC, Mike Pagano
Details
new script version 0.1.2 (portpeek,10.22 KB, application/octet-stream)
2006-03-08 13:35 UTC, Mike Pagano
Details
man page for portpeek (portpeek.1,1.59 KB, application/octet-stream)
2006-03-08 13:36 UTC, Mike Pagano
Details
new script version 0.1.3 (portpeek,10.43 KB, application/octet-stream)
2006-03-17 10:06 UTC, Mike Pagano
Details
portpeek version 0.1.4 (portpeek,10.44 KB, application/octet-stream)
2006-03-25 11:57 UTC, Mike Pagano
Details
portpeek version 0.1.5 (portpeek,10.51 KB, application/x-python)
2006-04-05 16:59 UTC, Mike Pagano
Details
portpeek version 0.1.6 (portpeek,10.47 KB, application/x-python)
2006-04-05 17:01 UTC, Mike Pagano
Details
portpeek version 0.1.7 (portpeek,10.58 KB, application/octet-stream)
2006-04-07 12:14 UTC, Mike Pagano
Details
portpeek version 0.1.8 (portpeek,11.97 KB, application/octet-stream)
2006-04-21 08:51 UTC, Mike Pagano
Details
portpeek version 0.1.9 (portpeek,12.04 KB, application/octet-stream)
2006-04-21 10:15 UTC, Mike Pagano
Details
portpeek version 0.5.0 (portpeek,12.54 KB, application/octet-stream)
2006-04-21 13:07 UTC, Mike Pagano
Details
portpeek ebuild version 0.6.5 (portpeek,13.49 KB, text/plain)
2006-06-28 10:03 UTC, Mike Pagano
Details
portpeek ebuild version 0.7.0 (portpeek,13.91 KB, text/plain)
2006-08-10 07:02 UTC, Mike Pagano
Details
portpeek version 1.0.0 (portpeek,14.30 KB, application/octet-stream)
2006-09-15 16:36 UTC, Mike Pagano
Details
portpeek version 1.0.1 (portpeek,14.10 KB, text/plain)
2006-09-17 11:00 UTC, Mike Pagano
Details
portpeek version 1.0.5 (portpeek,15.43 KB, text/plain)
2006-10-03 15:46 UTC, Mike Pagano
Details
portpeek version 1.1.0 (portpeek,15.48 KB, text/plain)
2006-10-05 16:35 UTC, Mike Pagano
Details
portpeek version 1.2.0 (portpeek,16.93 KB, text/plain)
2006-12-20 07:23 UTC, Mike Pagano
Details
portpeek version 1.3.0 (portpeek,19.02 KB, text/plain)
2007-01-11 02:23 UTC, Mike Pagano
Details
portpeek version 1.3.1 (portpeek,19.02 KB, text/plain)
2007-01-11 16:38 UTC, Mike Pagano
Details
update to portpeek man page (portpeek.1,1.93 KB, text/plain)
2007-01-11 18:42 UTC, Mike Pagano
Details
portpeek version 1.4.0 - important bug fix (portpeek,21.27 KB, text/plain)
2007-01-19 20:13 UTC, Mike Pagano
Details
version 1.5.0 - better handling when fixing package files (portpeek,21.78 KB, text/plain)
2007-01-24 15:43 UTC, Mike Pagano
Details
version 1.5.1 - more accurate identification of stabled packages (portpeek,19.76 KB, text/plain)
2007-02-21 18:50 UTC, Mike Pagano
Details
portpeek version 1.5.5 (portpeek,19.92 KB, text/plain)
2007-08-03 12:45 UTC, Mike Pagano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Pagano gentoo-dev 2006-01-11 07:13:23 UTC
Motivation:

I tend to only unmask an ebuild in my stable (as can be) desktop when I desire a specific functionality that only exists in an unstable package. For my own reasons, I like to only unmask a specific version and leave it at that until this version or a higher one goes stable, unless I have a problem. I usually do not know if a new unstable version exists unless my keyworded package is removed from the tree or if I specifically look and research a package.


Script:

Hence, there could be 1 or more new versions of a specific package that I am unaware of. A good example of this is nvidia-kernel. I unmasked the 7174 version for some reason I long forgot, but in the meantime, seven or so new packages have been released.

I've written a script to show this information.  It will display your package from the package.keyword files and list the newer ebuilds that have been released along with its keywords. It also can be used against package.unmask and package.mask but the latter has not been tested as much.

It needs some more work and I'm not sure if this is only useful to me, but I thought I would share for comments/suggestions or interest as being part of portage-tools.

Places were I have borrowed code have been noted and credited. 

Example:

# portpeek -k  

Installed: media-video/nvidia-kernel-1.0.7174  Keywords ['-*', '~x86', '~amd64']
Available: media-video/nvidia-kernel-1.0.7667 Keywords: ['-*', '~x86', '~amd64']
Available: media-video/nvidia-kernel-1.0.7676 Keywords: ['-*', '~x86', '~amd64']
Available: media-video/nvidia-kernel-1.0.7676-r1 Keywords: ['-*', '~x86', '~amd64']
Available: media-video/nvidia-kernel-1.0.8174 Keywords: ['-*', '~x86', '~amd64']
Available: media-video/nvidia-kernel-1.0.8174-r1 Keywords: ['-*', '~x86', '~amd64']
Available: media-video/nvidia-kernel-1.0.8178 Keywords: ['-*', '~x86', '~amd64']
Available: media-video/nvidia-kernel-1.0.8178-r1 Keywords: ['-*', '~x86', '~amd64']
Comment 1 Mike Pagano gentoo-dev 2006-01-11 07:14:44 UTC
Created attachment 76838 [details]
portpeek script to query against user unmasked packages
Comment 2 Mike Pagano gentoo-dev 2006-02-01 16:10:31 UTC
Created attachment 78685 [details]
portpeek script to query against user unmasked packages

Update handles invalid atoms and provides better looking output.
Comment 3 Mike Pagano gentoo-dev 2006-02-01 17:57:19 UTC
Created attachment 78686 [details]
script to help manage package.keywords,unmask and mask

major overhaul of parameter parsing and you can opt to only show ebuilds that have an available upgrade option
Comment 4 Mike Pagano gentoo-dev 2006-02-02 11:07:23 UTC
Created attachment 78738 [details]
script to help manage package.keywords,unmask and mask

Now, if you have a masked ebuild that does not exist anymore, it will display available ebuilds that do exist.
Comment 5 Mike Pagano gentoo-dev 2006-02-02 17:27:05 UTC
Created attachment 78767 [details]
script to help manage package.keywords,unmask and mask

User requested changes made to usage and colors.  Fixed bug when ebuild version did not exist in portage but others versions did.
Comment 6 Mike Pagano gentoo-dev 2006-02-03 09:52:51 UTC
Created attachment 78815 [details]
script to help manage package.keywords,unmask and mask

bugfix where 'for' loop was outside proper indent.
Comment 7 Mike Pagano gentoo-dev 2006-02-04 12:04:39 UTC
Created attachment 78878 [details]
script to help manage package.keywords,unmask and mask

Added some defensive code to account for a bug uncovered by a user.
Comment 8 Mike Pagano gentoo-dev 2006-02-04 14:52:55 UTC
Created attachment 78901 [details]
new script version 0.0.5

Some defensive coding base on user feedback.
Comment 9 Mike Pagano gentoo-dev 2006-02-06 05:17:29 UTC
Created attachment 79021 [details]
new script version 0.0.6

Thanks to dol-sen, I now handle when a package is installed and the fresh emerge sync no longer contains that ebuild or package as the deprecated ebuild is found in /var/db/pkg/$CATEGORY/$PACKAGE-VERSION/$PACKAGE-VERSION.ebuild.
Comment 10 Mike Pagano gentoo-dev 2006-02-06 09:27:40 UTC
Created attachment 79036 [details]
new script version 0.0.7

Applied user submitted patch, (thanks sn4ip3r), to handle tabs with the package.files.
Comment 11 Mike Pagano gentoo-dev 2006-02-07 10:00:46 UTC
Created attachment 79136 [details]
new script version 0.0.8

The script now handles the above error a little nicer with better formatted error messages.
Comment 12 Mike Pagano gentoo-dev 2006-02-14 05:40:23 UTC
Created attachment 79754 [details]
new script version 0.0.9

Better handling when category/package without version is masked. Better color output to easily discern ebuild options.
Comment 13 Mike Pagano gentoo-dev 2006-03-06 08:50:48 UTC
Created attachment 81530 [details]
new script version 0.1.0

This version will display a message when the user had a package in the portage.* files when that package is stable for their arch.
Comment 14 Mike Pagano gentoo-dev 2006-03-06 08:52:57 UTC
Replace portage.* with package.* in the above comment.
Comment 15 Mike Pagano gentoo-dev 2006-03-06 13:53:11 UTC
Created attachment 81560 [details]
new script version 0.1.1

Much cleaner output. I now filter on the arch and stable packages display cleaner.
Comment 16 Maxim Grechkin 2006-03-08 02:29:43 UTC
Maybe add this to gentoolkit?
Comment 17 Paul Varner (RETIRED) gentoo-dev 2006-03-08 09:37:10 UTC
This is on my list to be evaluated for inclusion in gentoolkit. Before it gets included though, I'm waiting for the changes to settle down (i.e it looks stable) because once it is included, then the tools-portage herd is required to maintain it and it is difficult to coordinate constant changes with 3rd party authors.

The second thing, that would be very nice, is for someone to create a man page.  All new utilities that placed in gentoolkit require a man page for documentation. 
Comment 18 Mike Pagano gentoo-dev 2006-03-08 10:48:25 UTC
Thanks for the comments and I will definitely write a man page and do anything/everything else to facilitate this becoming part of gentoolkit.

Comment 19 Mike Pagano gentoo-dev 2006-03-08 13:35:32 UTC
Created attachment 81723 [details]
new script version 0.1.2

I did some spelling changes in the usage and I added a --help option to show usage.
Comment 20 Mike Pagano gentoo-dev 2006-03-08 13:36:06 UTC
Created attachment 81724 [details]
man page for portpeek

Here is the man page for portpeek.
Comment 21 Mike Pagano gentoo-dev 2006-03-17 10:06:54 UTC
Created attachment 82395 [details]
new script version 0.1.3

Some bug fixes for keyword displaying when a package no longer exists.
Comment 22 Mike Pagano gentoo-dev 2006-03-25 11:57:51 UTC
Created attachment 83105 [details]
portpeek version 0.1.4

Found small bug where incorrect color was displayed for masked packages with versions less than the installed one
Comment 23 Mike Pagano gentoo-dev 2006-04-05 16:59:50 UTC
Created attachment 84039 [details]
portpeek version 0.1.5

It seems the is_masked() function wasn't behaving always as I expected, so I changed how the package mask status is determined.
Comment 24 Mike Pagano gentoo-dev 2006-04-05 17:01:49 UTC
Created attachment 84040 [details]
portpeek version 0.1.6

Removed debug messages
Comment 25 Mike Pagano gentoo-dev 2006-04-07 12:14:07 UTC
Created attachment 84150 [details]
portpeek version 0.1.7

Found bug where incorrect color was displayed when stable keyword appeared alongside -*
Comment 26 Mike Pagano gentoo-dev 2006-04-21 08:51:50 UTC
Created attachment 85121 [details]
portpeek version 0.1.8

Update to display message indicating package entry found is not installed on the system.
Comment 27 Mike Pagano gentoo-dev 2006-04-21 10:15:20 UTC
Created attachment 85124 [details]
portpeek version 0.1.9

I found an instance where a package was not displaying as package masked when it should have. If anyone encounters the same thing, please let me know.
Comment 28 Mike Pagano gentoo-dev 2006-04-21 13:07:20 UTC
Created attachment 85140 [details]
portpeek version 0.5.0

ok, thanks to Antarus, I now have a better way to identify masked packages from the user or the profile. Thanks, Antarus!

And sorry for the spam!
Comment 29 Mike Pagano gentoo-dev 2006-06-28 10:03:52 UTC
Created attachment 90362 [details]
portpeek ebuild version 0.6.5

Changes:

1. Fixed bug where packages that were keyworded, but stable, were not displaying when -ac parameter was specified
2. Output from package.mask items now make more sense
3. Refactored functions slightly
4. ran code through pychecker and pylint
Comment 30 Mike Pagano gentoo-dev 2006-08-10 07:02:45 UTC
Created attachment 93910 [details]
portpeek ebuild version 0.7.0

portpeek now supports the config-files-as-directories feature for package.keywords, package.mask, package.unmask and package.keywords (IOW: /etc/portage/package.*)
Comment 31 Mike Pagano gentoo-dev 2006-09-15 16:36:37 UTC
Created attachment 97097 [details]
portpeek version 1.0.0

I found a bug where portpeek would not identify a correctly masked package if the entire category/package (no version) was masked.

I bumped the version to 1.0.0
Comment 32 Mike Pagano gentoo-dev 2006-09-17 11:00:55 UTC
Created attachment 97267 [details]
portpeek version 1.0.1

Incorporated a few minor tweaks thanks to neuron. No features have changed.
Comment 33 Mike Pagano gentoo-dev 2006-10-03 15:46:47 UTC
Created attachment 98730 [details]
portpeek version 1.0.5

This version will now display footnotes for ebuilds located in overlays.
Comment 34 Mike Pagano gentoo-dev 2006-10-05 16:35:55 UTC
Created attachment 98897 [details]
portpeek version 1.1.0

Minor bug fixed for proper displaying of "No ebuild options found" message.
Comment 35 Mike Pagano gentoo-dev 2006-12-20 07:23:28 UTC
Created attachment 104441 [details]
portpeek version 1.2.0

portpeek version 1.2.0 now has a option to show only the ebuilds that have been stabilized but appear in the package.mask,package.unmask files.

e.g. portpeek -ar
Comment 36 Mike Pagano gentoo-dev 2007-01-11 02:23:33 UTC
Created attachment 106480 [details]
portpeek version 1.3.0

I added some new functionality.

To automatically remove stabled packages no longer needing to be unmasked or keyworded, I included the --fix or -f command line parameters.

As always, let me know if you have any issues and please include the package.keywords or package.unmask file. Whichever it fails on.
Comment 37 Mike Pagano gentoo-dev 2007-01-11 16:38:45 UTC
Created attachment 106576 [details]
portpeek version 1.3.1

Fixed typo in 1.3.0
Comment 38 Mike Pagano gentoo-dev 2007-01-11 18:42:40 UTC
Created attachment 106580 [details]
update to portpeek man page
Comment 39 Mike Pagano gentoo-dev 2007-01-19 20:13:35 UTC
Created attachment 107478 [details]
portpeek version 1.4.0 - important bug fix

A bug existed where duplicate entries could be inserted into the package.* files.
Comment 40 Mike Pagano gentoo-dev 2007-01-24 15:43:24 UTC
Created attachment 108038 [details]
version 1.5.0 - better handling when fixing package files

Fixed the code that removes stabled packages from package files
Comment 41 Mike Pagano gentoo-dev 2007-02-21 18:50:58 UTC
Created attachment 110877 [details]
version 1.5.1 - more accurate identification of stabled packages
Comment 42 Mike Pagano gentoo-dev 2007-08-03 12:43:04 UTC
updating url, sorry for the bugspam
Comment 43 Mike Pagano gentoo-dev 2007-08-03 12:45:50 UTC
Created attachment 126796 [details]
portpeek version 1.5.5

Bug fixes, details in URL.
Comment 44 Mike Pagano gentoo-dev 2007-08-13 19:23:36 UTC
Now maintained in the sunrise overlay: 
http://overlays.gentoo.org/proj/sunrise/browser/sunrise/app-portage/portpeek
Comment 45 Mike Pagano gentoo-dev 2007-10-10 14:46:44 UTC
In portage.