Skip to content

Commit

Permalink
Merge pull request #408 from jmtd/OPENJDK-2384-singleton-jdk-alternat…
Browse files Browse the repository at this point in the history
…ives

Openjdk 2384 singleton jdk alternatives
  • Loading branch information
jmtd authored Nov 13, 2023
2 parents 9b8a913 + 392e8e7 commit 47d070a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/singleton-jdk/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ fi
# Clean up any java-* packages that have been installed that do not match
# our stated JAVA_VERSION-JAVA_VENDOR (e.g.: 11-openjdk; 1.8.0-openj9)
rpm -e --nodeps $(rpm -qa java-* | grep -v "^java-${JAVA_VERSION}-${JAVA_VENDOR}")

# workaround for <https://issues.redhat.com/browse/RHEL-3437>
# The alternative link groups touched here need to match up with those set in
# modules/jdk/*/configure.sh
_arch="$(uname -i)"
for alt in java javac java_sdk_openjdk jre_openjdk; do
alternatives --set "$alt" "java-${JAVA_VERSION}-${JAVA_VENDOR}.${_arch}"
done

0 comments on commit 47d070a

Please sign in to comment.