Skip to content

Commit cf1611c

Browse files
committed
[OPENJDK-2372] singleton-jdk: force-set more java alternatives
This is to fix a race situation where, sometimes, removing JDK8 after installing JDK11 results in the jre_openjdk link group being empty. For further information https://issues.redhat.com/browse/OPENJDK-2372 https://issues.redhat.com/browse/RHEL-3437 https://issues.redhat.com/browse/RHEL-3444 Signed-off-by: Jonathan Dowland <[email protected]>
1 parent d39eac6 commit cf1611c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/singleton-jdk/configure.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ fi
1616
rpm -e --nodeps $(rpm -qa java-* | grep -v "^java-${JAVA_VERSION}-${JAVA_VENDOR}")
1717

1818
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2089626
19-
alternatives --set java "java-${JAVA_VERSION}-${JAVA_VENDOR}.$(uname -m)"
19+
_arch="$(uname -m)"
20+
for alt in java javac java_sdk_openjdk jre_openjdk; do
21+
alternatives --set "$alt" "$java-${JAVA_VERSION}-${JAVA_VENDOR}.${_arch}"
22+
done

0 commit comments

Comments
 (0)