[java-wrappers] 30/61: [java-wrappers] Building upon Gabriele's patch for a proper fix

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Tue Oct 24 17:55:19 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository java-wrappers.

commit ae552d45dbeb5ea04c72f4c27a9e0e529e65f36f
Author: Vincent Fourmond <fourmond at debian.org>
Date:   Thu Jan 13 22:00:54 2011 +0000

    [java-wrappers] Building upon Gabriele's patch for a proper fix
---
 debian/changelog | 10 +++++++---
 java-wrappers.sh | 20 ++++++++++++++------
 jvm-list.sh      |  2 +-
 3 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b8e5f6a..d929f7a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
-java-wrappers (0.1.17) UNRELEASED; urgency=low
+java-wrappers (0.1.17) experimental; urgency=low
 
-  * REMOVEME toward java-alternatives integration (will close #609731).
+  [ Gabriele Giacone ]
+  * First step toward java-alternatives integration
 
- -- Gabriele Giacone <1o5g4r8o at gmail.com>  Wed, 12 Jan 2011 22:18:19 +0100
+  [ Vincent Fourmond ]
+  * Final step (closes: #609731); thanks Gabriele for the first ;-)...
+
+ -- Vincent Fourmond <fourmond at debian.org>  Thu, 13 Jan 2011 22:59:38 +0100
 
 java-wrappers (0.1.16) unstable; urgency=low
 
diff --git a/java-wrappers.sh b/java-wrappers.sh
index dba8cd2..4a0be8f 100644
--- a/java-wrappers.sh
+++ b/java-wrappers.sh
@@ -117,13 +117,21 @@ find_java_runtime() {
 	if [ -z "$DIRS" ]; then
 	    DIRS=$all_runtimes
 	fi
+	# First, we check if __jvm_alt is within the possible choices:
+	if echo "$DIRS" | fgrep "$__jvm_alt" > /dev/null ; then
+	    JAVA_HOME="$__jvm_alt"
+	    java_debug "Picking up the JVM designated by the alternatives system: "
+	    java_debug "  JAVA_HOME = '$JAVA_HOME'"
+	else
+
         # And pick up the first one that works reasonably
-	for dir in $DIRS; do
-	    if [ -x $dir/bin/java ]; then
-		JAVA_HOME=$dir
-		break;
-	    fi
-	done
+	    for dir in $DIRS; do
+		if [ -x $dir/bin/java ]; then
+		    JAVA_HOME=$dir
+		    break;
+		fi
+	    done
+	fi
     else
 	java_debug "Using provided JAVA_HOME = '$JAVA_HOME'"
     fi
diff --git a/jvm-list.sh b/jvm-list.sh
index 0ed1f83..383f9b2 100644
--- a/jvm-list.sh
+++ b/jvm-list.sh
@@ -66,6 +66,6 @@ __jvm_java2="$__jvm_java5 $__jvm_gcj2"
 __jvm_alt=$(readlink /etc/alternatives/java|sed -n 's/\(\/usr\/lib\/jvm\/[^\/]*\)\/.*/\1/p')
 
 # All JVMs
-__jvm_all="$__jvm_alt $__jvm_default /usr/lib/jvm/* $__jvm_ibm $__jvm_sun4 $__jvm_sablevm $__jvm_kaffe"
+__jvm_all="$__jvm_default /usr/lib/jvm/* $__jvm_ibm $__jvm_sun4 $__jvm_sablevm $__jvm_kaffe"
 
 # Probably here should come a few meaningful global aliases.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/java-wrappers.git



More information about the pkg-java-commits mailing list