aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog4
-rwxr-xr-xsrc/gjl13
2 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 004ff80..19fd203 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
#Keeping this file started after version 2.0.31
+ 01 Mar 2007; Petteri Räty <betelgeuse@gentoo.org> src/gjl:
+ Make gjl report missing dependencies with a useful error message instead of
+ a stack trace. Bug #168855.
+
28 Feb 2007; Petteri Räty <betelgeuse@gentoo.org> man/java-config-2.1:
The default browser plugin can be set by eselect java-nsplugin so that is
not a bug any more.
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)