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']
Created attachment 76838 [details] portpeek script to query against user unmasked packages
Created attachment 78685 [details] portpeek script to query against user unmasked packages Update handles invalid atoms and provides better looking output.
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
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.
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.
Created attachment 78815 [details] script to help manage package.keywords,unmask and mask bugfix where 'for' loop was outside proper indent.
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.
Created attachment 78901 [details] new script version 0.0.5 Some defensive coding base on user feedback.
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.
Created attachment 79036 [details] new script version 0.0.7 Applied user submitted patch, (thanks sn4ip3r), to handle tabs with the package.files.
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.
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.
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.
Replace portage.* with package.* in the above comment.
Created attachment 81560 [details] new script version 0.1.1 Much cleaner output. I now filter on the arch and stable packages display cleaner.
Maybe add this to gentoolkit?
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.
Thanks for the comments and I will definitely write a man page and do anything/everything else to facilitate this becoming part of gentoolkit.
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.
Created attachment 81724 [details] man page for portpeek Here is the man page for portpeek.
Created attachment 82395 [details] new script version 0.1.3 Some bug fixes for keyword displaying when a package no longer exists.
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
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.
Created attachment 84040 [details] portpeek version 0.1.6 Removed debug messages
Created attachment 84150 [details] portpeek version 0.1.7 Found bug where incorrect color was displayed when stable keyword appeared alongside -*
Created attachment 85121 [details] portpeek version 0.1.8 Update to display message indicating package entry found is not installed on the system.
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.
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!
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
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.*)
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
Created attachment 97267 [details] portpeek version 1.0.1 Incorporated a few minor tweaks thanks to neuron. No features have changed.
Created attachment 98730 [details] portpeek version 1.0.5 This version will now display footnotes for ebuilds located in overlays.
Created attachment 98897 [details] portpeek version 1.1.0 Minor bug fixed for proper displaying of "No ebuild options found" message.
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
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.
Created attachment 106576 [details] portpeek version 1.3.1 Fixed typo in 1.3.0
Created attachment 106580 [details] update to portpeek man page
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.
Created attachment 108038 [details] version 1.5.0 - better handling when fixing package files Fixed the code that removes stabled packages from package files
Created attachment 110877 [details] version 1.5.1 - more accurate identification of stabled packages
updating url, sorry for the bugspam
Created attachment 126796 [details] portpeek version 1.5.5 Bug fixes, details in URL.
Now maintained in the sunrise overlay: http://overlays.gentoo.org/proj/sunrise/browser/sunrise/app-portage/portpeek
In portage.