Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 249177

Summary: Alternative to app-admin/python-updater
Product: Gentoo Linux Reporter: michael <michael>
Component: [OLD] DevelopmentAssignee: Python Gentoo Team <python>
Status: RESOLVED OBSOLETE    
Severity: enhancement CC: ainsaar, dev-portage, ferringb, pacho
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: python-updater.py

Description michael@smith-li.com 2008-11-28 16:44:04 UTC
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:
Comment 1 michael@smith-li.com 2008-11-28 16:44:51 UTC
Created attachment 173657 [details]
python-updater.py
Comment 2 Zac Medico gentoo-dev 2008-11-29 03:35:20 UTC
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.
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2015-09-14 06:58:47 UTC
Portage has moved on too far to match this script.