Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
aaa_base.30689
git-47-04210f8df15da0ba4d741cfe1693af06f5978a1d...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File git-47-04210f8df15da0ba4d741cfe1693af06f5978a1d.patch of Package aaa_base.30689
From 04210f8df15da0ba4d741cfe1693af06f5978a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Oertel?= <ro@suse.de> Date: Mon, 18 Sep 2023 17:37:29 +0200 Subject: [PATCH] respect /etc/alternatives/java when setting JAVA_HOME patch alljava.sh and alljava.csh along the patch from bug#1107342 diff --git a/files/etc/profile.d/alljava.csh b/files/etc/profile.d/alljava.csh index 297303c..3ab6066 100644 --- a/files/etc/profile.d/alljava.csh +++ b/files/etc/profile.d/alljava.csh @@ -9,7 +9,13 @@ # JDK_HOME, SDK_HOME # -foreach JDIR ( "/usr/lib64/jvm" "/usr/lib/jvm" "/usr/java/latest" "/usr/java" ) +set ALTERNATIVES_JAVA_HOME +if ( -l /etc/alternatives/java ) then + set ALTERNATIVES_JAVA_LINK=`realpath /etc/alternatives/java` + set ALTERNATIVES_JAVA_HOME=$ALTERNATIVES_JAVA_LINK:h:h +endif + +foreach JDIR ( $ALTERNATIVES_JAVA_HOME "/usr/lib64/jvm" "/usr/lib/jvm" "/usr/java/latest" "/usr/java" ) if ( ! -d $JDIR ) continue diff --git a/files/etc/profile.d/alljava.sh b/files/etc/profile.d/alljava.sh index 3ce34de..fb0eb14 100644 --- a/files/etc/profile.d/alljava.sh +++ b/files/etc/profile.d/alljava.sh @@ -9,7 +9,13 @@ # JDK_HOME, SDK_HOME # -for JDIR in /usr/lib64/jvm /usr/lib/jvm /usr/java/latest /usr/java; do +if test -L /etc/alternatives/java +then + ALTERNATIVES_JAVA_LINK=`realpath /etc/alternatives/java` + ALTERNATIVES_JAVA_HOME=${ALTERNATIVES_JAVA_LINK/\/bin\/java} +fi + +for JDIR in $ALTERNATIVES_JAVA_HOME /usr/lib64/jvm /usr/lib/jvm /usr/java/latest /usr/java; do if ! test -d $JDIR; then continue
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor