mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-06-07 21:55:04 +02:00
fix start script behavior with dev-java/openjdk-jre-bin:21 change java dependency - thanks to @vaukai for pointing that out Signed-off-by: Martin Dummer <martin.dummer@gmx.net> Closes: https://github.com/gentoo/gentoo/pull/36423 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
33 lines
971 B
Diff
33 lines
971 B
Diff
This patch searches the jre 21 binary in the gentoo specific directories.
|
|
|
|
Signed-off-by: Julien Roy <julien@jroy.ca>
|
|
|
|
--- a/bin/signal-cli
|
|
+++ b/bin/signal-cli
|
|
@@ -118,13 +118,19 @@
|
|
|
|
|
|
# Determine the Java command to use to start the JVM.
|
|
-if [ -n "$JAVA_HOME" ] ; then
|
|
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
|
- # IBM's JDK on AIX uses strange locations for the executables
|
|
- JAVACMD=$JAVA_HOME/jre/sh/java
|
|
- else
|
|
- JAVACMD=$JAVA_HOME/bin/java
|
|
- fi
|
|
+# This package needs Java 21,
|
|
+# so we must search for matching java binaries
|
|
+for I in /usr/lib*/openjdk-21 /opt/openjdk-bin-21 /opt/openjdk-jre-bin-21; do
|
|
+ J_TRY="$I/bin/java"
|
|
+ if [ -x "$J_TRY" ] ; then
|
|
+ "$J_TRY" -version 2>&1 | grep --fixed-strings --quiet "21."
|
|
+ if [ $? -eq 0 ] ; then
|
|
+ JAVACMD="$J_TRY"
|
|
+ break
|
|
+ fi
|
|
+ fi
|
|
+done
|
|
+if [ -n "$JAVACMD" ] ; then
|
|
if [ ! -x "$JAVACMD" ] ; then
|
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
|
|