aboutsummaryrefslogtreecommitdiff
path: root/src/gjl
diff options
context:
space:
mode:
authorPetteri Räty <betelgeuse@gentoo.org>2007-03-01 13:22:15 +0000
committerPetteri Räty <betelgeuse@gentoo.org>2007-03-01 13:22:15 +0000
commit4ec953ba80f5cf3440ac1a5fef2276ffd628c551 (patch)
tree782aba264be4d039b01bf9eee45841c9aefb1da4 /src/gjl
parentThe default browser plugin can be set by eselect java-nsplugin so that is not... (diff)
downloadjava-config-4ec953ba80f5cf3440ac1a5fef2276ffd628c551.tar.gz
java-config-4ec953ba80f5cf3440ac1a5fef2276ffd628c551.tar.bz2
java-config-4ec953ba80f5cf3440ac1a5fef2276ffd628c551.zip
Make gjl report missing dependencies with a useful error message instead of a stack trace. Bug #168855.
svn path=/projects/java-config-2/trunk/; revision=3920
Diffstat (limited to 'src/gjl')
-rwxr-xr-xsrc/gjl13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gjl b/src/gjl
index 4eadc12..e1bee4b 100755
--- a/src/gjl
+++ b/src/gjl
@@ -33,9 +33,18 @@ def get_needed_packages(package):
while len(unresolved) > 0:
pkg = unresolved.pop()
resolved.add(pkg)
-
+ # dep is in the form of (jar, pkg)
for dep in pkg.deps():
- p = manager.get_package(dep[-1])
+ dep_pkg = dep[-1]
+ p = manager.get_package(dep_pkg)
+ if p is None:
+ msg = """
+Package %s not found in the system. This package is listed as a
+dependency of %s. Please run emerge -uDa %s and if it does not bring in the
+needed dependency, report this to http://bugs.gentoo.org.
+"""
+
+ abort(msg % (dep_pkg,pkg,pkg))
if p not in resolved:
unresolved.add(p)