summaryrefslogtreecommitdiff
path: root/trunk
diff options
context:
space:
mode:
authorfuzzyray <fuzzyray@gentoo.org>2007-03-09 04:05:19 +0000
committerfuzzyray <fuzzyray@gentoo.org>2007-03-09 04:05:19 +0000
commitf6ec88204b28e3c07eba062902884d331c45741f (patch)
treeff00bc3d36faef48ccb3500c283368458bbcb1f3 /trunk
parent33a08ccdd26926858c602ea6ade4d64fed5c9bb6 (diff)
downloadgentoolkit-f6ec88204b28e3c07eba062902884d331c45741f.tar.gz
Improved handling of KeyError in equery depends command (Bug #169929).
svn path=/; revision=352
Diffstat (limited to 'trunk')
-rw-r--r--trunk/ChangeLog4
-rwxr-xr-xtrunk/src/equery/equery13
2 files changed, 14 insertions, 3 deletions
diff --git a/trunk/ChangeLog b/trunk/ChangeLog
index 89723ee..19eef9d 100644
--- a/trunk/ChangeLog
+++ b/trunk/ChangeLog
@@ -1,3 +1,7 @@
+2007-03-08 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Improved handling of KeyError in equery depends command
+ (Bug #169929)
+
2007-03-07 Paul Varner <fuzzyray@gentoo.org>
* revdep-rebuild: Change ordering algorithm to use --deep instead of
--emptytree on the advice of zmedico
diff --git a/trunk/src/equery/equery b/trunk/src/equery/equery
index 0acf7a2..ff80da5 100755
--- a/trunk/src/equery/equery
+++ b/trunk/src/equery/equery
@@ -1129,8 +1129,15 @@ class CmdListDepends(Command):
# Find all packages matching the dependency
depstr = dependency[0]+dependency[2]
if not depstr in self.deppkgs:
- depcpvs = map((lambda x: x.get_cpv()), gentoolkit.find_packages(depstr))
- self.deppkgs[depstr] = depcpvs
+ try:
+ depcpvs = map((lambda x: x.get_cpv()), gentoolkit.find_packages(depstr))
+ self.deppkgs[depstr] = depcpvs
+ except KeyError, e:
+ print_warn("")
+ print_warn("Package: " + depstr + " contains invalid dependency specification.")
+ print_warn("Portage error: " + str(e))
+ print_warn("")
+ continue
else:
depcpvs = self.deppkgs[depstr]
for x in depcpvs:
@@ -1741,7 +1748,7 @@ if __name__ == "__main__":
print_error("")
print_error("Note: The symbols > and < are used for redirection in the shell")
print_error("and must be quoted if either one is used.")
-
+
else:
print_error("Internal portage error, terminating")
if len(e[0]):