Summary: | 'equery list' fails with missing ebuilds | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Andre Hinrichs <andre.hinrichs> |
Component: | Tools | Assignee: | Karl Trygve Kalleberg (RETIRED) <karltk> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | acid.punk, craig.lawson, mjclement, news, quetschke, sascha-gentoo-bugzilla |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Patch for equery (gentoolkit-0.2.0-pre8) to handle missing ebuild exceptions
Patch for gentoolkit.py (gentoolkit-0.2.0-pre8) for package lookup |
Description
Andre Hinrichs
2004-02-10 03:30:38 UTC
It doesn't traceback any longer in pre7, but the "missing ebuild" message is a portage thing and hard to work around. Well, pre7 traces back as well for me. I stumbled over this bug while doing: $ equery -q list \* !!! aux_get(): ebuild for 'dev-util/subversion-0.26.0' does not exist at: !!! /usr/portage/dev-util/subversion/subversion-0.26.0.ebuild Traceback (most recent call last): File "/usr/bin/equery", line 949, in ? if e and type(e[0]) == types.ListType and \ IndexError: tuple index out of range 134 the aquivalent of 'qpkg -I' $ equery list gentoolkit Searching for package 'gentoolkit' in all categories among: * installed packages [I--] [ ] app-portage/gentoolkit-0.2.0_pre7 (0) Does for me, too, in gentoolkit-0.2.0_pre8. The equery's depgraph function has the same problem. Although the missing ebuild message (as was stated) comes from the portage module, the unhandled exception can be dealt with in equery. The following patch does just that. Created attachment 29681 [details, diff]
Patch for equery (gentoolkit-0.2.0-pre8) to handle missing ebuild exceptions
Patch catches KeyError exceptions raised by portage module when it discovers a
missing ebuild. Although portage has already printed a warning (too bad), this
patch allows equery to recover and continue rather than crash.
To apply patch:
1. cd to same directory as equery file
2. "patch -p0 < [patch-file]
Created attachment 29777 [details, diff]
Patch for gentoolkit.py (gentoolkit-0.2.0-pre8) for package lookup
Fixes the gentoolkit module so that when retrieving environment variable data
from an ebuild, it first checks portage's installed packages database. If the
package is not installed, the data instead comes from the available packages
database. Previous behavior was to only check the available packages database,
and this was a problem when the package was so old that it's ebuild had been
removed from the list of available packages.
Other gentoolkit utilities affected by this change are:
* etcat's graph (-g) function. Seems to work better with patch.
* etcat's depends (-d) function. Broken before; no change.
* equery's list function. No longer prints warning for missing ebuild.
* equery's depgraph function. No longer prints warning for missing ebuild,
*and* completes the entire tree.
This patch is to be used with my previous patch for equery.
To apply patch:
1. cd to same directory as gentoolkit.py file
2. "patch -p0 < [patch-file]
Will look at it. Fixed in CVS. Will be part of the next Gentoolkit release. |