I would like to get input on this python script that does the same thing as python-updater, but considerably faster. Currently it's not entirely complete, and grabs almost all the same packages as python-updater, but it just outputs them as a list. Its only dependencies are python 2.1-or-better and portage. Along with other constructive suggestions I would appreciate comments on my use of the portage API, because this is my first attempt to use it. Reproducible: Always Steps to Reproduce:
Created attachment 173657 [details] python-updater.py
It seems like your script is based on searching for file owners, and newer versions of portage (>=portage-2.1.5.x) have a contents index which can be used to optimize searches like this. For example, it's possible to run `emerge /lib/modules` as a substitute for module-rebuild, and in portage-2.2 the default sets.conf includes a @module-rebuild set. The contents index is also accessible via a portageq command, so a command like `portageq owners / /usr/lib/python2.4/site-packages` could be used by a script locate all of packages that install files there.
Portage has moved on too far to match this script.