[pkg-java] r13504 - in trunk/java-wrappers: . debian

Vincent Fourmond fourmond at alioth.debian.org
Mon Apr 4 19:10:58 UTC 2011


Author: fourmond
Date: 2011-04-04 19:10:52 +0000 (Mon, 04 Apr 2011)
New Revision: 13504

Modified:
   trunk/java-wrappers/debian/changelog
   trunk/java-wrappers/java-wrappers.sh
   trunk/java-wrappers/jvm-list.sh
Log:
[java-wrappers] Severely trim down the list of valid JVMs + ensure the likes of find_java_runtime default-jre are spotted in due time

Modified: trunk/java-wrappers/debian/changelog
===================================================================
--- trunk/java-wrappers/debian/changelog	2011-04-04 18:35:33 UTC (rev 13503)
+++ trunk/java-wrappers/debian/changelog	2011-04-04 19:10:52 UTC (rev 13504)
@@ -2,9 +2,13 @@
 
   * Final form of the find_jar_classpath function that now only performs
     path expansion for the argument, but not for the elements found in the
-    manifests that should be full paths anyway.
+    manifests that should be full paths anyway (closes: #563197)
+  * Trim down significantly the number of JVMs available, as fortunately
+    the dozens-of-jvms dark age is long gone (closes: #612903)
+  * Make it sure that mistakes such as find_java_runtime default-jre won't
+    go unnoticed.
 
- -- Vincent Fourmond <fourmond at debian.org>  Mon, 04 Apr 2011 20:31:36 +0200
+ -- Vincent Fourmond <fourmond at debian.org>  Mon, 04 Apr 2011 21:08:31 +0200
 
 java-wrappers (0.1.20) experimental; urgency=low
 

Modified: trunk/java-wrappers/java-wrappers.sh
===================================================================
--- trunk/java-wrappers/java-wrappers.sh	2011-04-04 18:35:33 UTC (rev 13503)
+++ trunk/java-wrappers/java-wrappers.sh	2011-04-04 19:10:52 UTC (rev 13504)
@@ -105,13 +105,17 @@
 	
 	while test "$1"
 	do 
-	    found_jvm=$(eval "echo -n \$__jvm_$1")
-	    if [ -z "$found_jvm" ]; then
-		java_warning "JVM flavor '${1:-none}' not understood"
+	    if echo $1 | egrep -- '[^0-9A-Za-z_]'; then
+		java_warning "JVM flavor '${1}' contains illegal characters"
 	    else
-		DIRS="$DIRS $found_jvm"
-		shift
+		found_jvm=$(eval "echo -n \$__jvm_$1")
+		if [ -z "$found_jvm" ] ; then
+		    java_warning "JVM flavor '${1:-none}' not understood"
+		else
+		    DIRS="$DIRS $found_jvm"
+		fi
 	    fi
+	    shift
 	done
 	# Nothing means everything
 	if [ -z "$DIRS" ]; then

Modified: trunk/java-wrappers/jvm-list.sh
===================================================================
--- trunk/java-wrappers/jvm-list.sh	2011-04-04 18:35:33 UTC (rev 13503)
+++ trunk/java-wrappers/jvm-list.sh	2011-04-04 19:10:52 UTC (rev 13504)
@@ -26,39 +26,27 @@
 __jvm_default="/usr/lib/jvm/default-java"
 
 # Sun runtimes
-__jvm_sun4="/usr/lib/j2*1.4-sun"
-__jvm_sun5="/usr/lib/jvm/java-1.5.0-sun /usr/lib/j2*1.5-sun"
 __jvm_sun6="/usr/lib/jvm/java-6-sun /usr/lib/j2*1.6-sun"
 
 # all sun runtimes
-__jvm_sun="$__jvm_sun4 $__jvm_sun5 $__jvm_sun6"
+__jvm_sun="$__jvm_sun6"
 # Sun version at least 5:
-__jvm_sunmin5="$__jvm_sun5 $__jvm_sun6"
+__jvm_sunmin5="$__jvm_sun6"
 
-# IBM runtimes. This comes from argouml.sh
-# I'm not quite sure it is still useful, but, we never know !
-__jvm_ibm="/usr/lib/j2*1.[456]-ibm"
-
-
 # Now, free runtimes:
 __jvm_gcj2="/usr/lib/jvm/java-*-gcj-4.* "
 __jvm_gcj5="/usr/lib/jvm/java-1.5*-gcj-4.* "
-__jvm_sablevm="/usr/lib/sablevm" # Probably should be dropped, only in etch
-__jvm_kaffe="/usr/lib/kaffe /usr/lib/kaffe/pthreads /usr/lib/kaffe/jthreads"
-__jvm_icedtea="/usr/lib/jvm/java-7-icedtea" # Probably should be dropped... 
-__jvm_cacao="/usr/lib/jvm/cacao"
 __jvm_openjdk6="/usr/lib/jvm/java-6-openjdk"
-__jvm_cacaooj6="/usr/lib/jvm/java-6-cacao/jre"
 
 # And a few aliases
 __jvm_gcj="$__jvm_gcj2"
-__jvm_openjdk="$__jvm_openjdk6 $__jvm_cacaooj6"
+__jvm_openjdk="$__jvm_openjdk6"
 
 # The java* runtimes:
 # -> corresponds to Provides: java6-runtime 
-__jvm_java6="$__jvm_openjdk6 $__jvm_cacaooj6 $__jvm_sun6"
+__jvm_java6="$__jvm_openjdk6 $__jvm_sun6"
 # -> corresponds to Provides: java5-runtime 
-__jvm_java5="$__jvm_gcj5 $__jvm_java6 $__jvm_sun5"
+__jvm_java5="$__jvm_gcj5 $__jvm_java6"
 # -> corresponds to Provides: java2-runtime 
 __jvm_java2="$__jvm_java5 $__jvm_gcj2"
 
@@ -66,6 +54,6 @@
 __jvm_alt=$(readlink /etc/alternatives/java|sed -n 's/\(\/usr\/lib\/jvm\/[^\/]*\)\/.*/\1/p')
 
 # All JVMs
-__jvm_all="$__jvm_default /usr/lib/jvm/* $__jvm_ibm $__jvm_sun4 $__jvm_sablevm $__jvm_kaffe"
+__jvm_all="$__jvm_default /usr/lib/jvm/*"
 
 # Probably here should come a few meaningful global aliases.




More information about the pkg-java-commits mailing list