summaryrefslogtreecommitdiff
path: root/trunk
diff options
context:
space:
mode:
authorfuzzyray <fuzzyray@gentoo.org>2007-03-31 22:39:20 +0000
committerfuzzyray <fuzzyray@gentoo.org>2007-03-31 22:39:20 +0000
commit3cb281b082bbd686ab66830ea87151e09a1c3622 (patch)
treead3191f3a7b29540a6cf9431be4bb40164c07879 /trunk
parent67f2caa5d98c9a0cf6bdbb6739f016c01ce2387f (diff)
downloadgentoolkit-3cb281b082bbd686ab66830ea87151e09a1c3622.tar.gz
Fix traceback in equery which (Bug #134053)
svn path=/; revision=369
Diffstat (limited to 'trunk')
-rw-r--r--trunk/ChangeLog3
-rwxr-xr-xtrunk/src/equery/equery7
2 files changed, 9 insertions, 1 deletions
diff --git a/trunk/ChangeLog b/trunk/ChangeLog
index 80e6d75..47e150a 100644
--- a/trunk/ChangeLog
+++ b/trunk/ChangeLog
@@ -1,3 +1,6 @@
+2007-03-31: Paul Varner <fuzzyray@gentoo.org>
+ * equery: Fix traceback in equery which (Bug #134053)
+
2007-03-29: Paul Varner <fuzzyray@gentoo.org>
* gentoolkit: Change package.get_???_deps() methods to try the portage
tree first, since emerge always uses the portage tree for dependencies.
diff --git a/trunk/src/equery/equery b/trunk/src/equery/equery
index bd3e715..8fec9fe 100755
--- a/trunk/src/equery/equery
+++ b/trunk/src/equery/equery
@@ -1027,7 +1027,12 @@ class CmdWhich(Command):
matches = gentoolkit.sort_package_list(matches)
if matches:
- print_info(0, os.path.normpath(matches[-1].get_ebuild_path()))
+ pkg = matches[-1]
+ ebuild_path = pkg.get_ebuild_path()
+ if ebuild_path:
+ print_info(0, os.path.normpath(ebuild_path))
+ else:
+ print_warn("There are no ebuilds to satisfy %s" % pkg.get_name())
else:
print_error("No masked or unmasked packages found for " + pp.pkgquery(query))