[MacPorts] #47036: jython installation hardcodes JAVA_HOME such that jython will fail if a user upgrades the Java installation
#47036: jython installation hardcodes JAVA_HOME such that jython will fail if a user upgrades the Java installation ---------------------+-------------------------------- Reporter: mtb19@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Keywords: | Port: jython ---------------------+-------------------------------- = To reproduce = * install an older version of Java (e.g., jdk1.7.0_67) * install jython * upgrade Java (e.g., to jdk1.7.0_75) * remove the older Java version * run `jython` * run `JAVA_HOME="$( /usr/libexec/java_home -v 1.7 )" jython` = Expected = Both `jython` and `JAVA_HOME="$( /usr/libexec/java_home -v 1.7 )" jython` should work. = Actual = Both fail, complaining that (e.g.) `/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/bin/java` doesn't exist. = Additional Detail = An inspection of `cat $( which jython )` reveals: {{{ ... # This file was generated by the Jython installer # Created on ... JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre" ... }}} These lines are not present in the [https://svn.code.sf.net/p/jython/svn/tags/Release_2_5_2/jython/src/shell/jyt... original source file]. Setting `JAVA_HOME` in this manner: * a) may not be correct for very long; and * b) permanently overrides any external setting This leaves the user with hand-editing `$( which jython )` or reinstalling jython after every Java upgrade to get it to work, neither of which is ideal. -- Ticket URL: <https://trac.macports.org/ticket/47036> MacPorts <https://www.macports.org/> Ports system for OS X
#47036: jython installation hardcodes JAVA_HOME such that jython will fail if a user upgrades the Java installation ----------------------+-------------------------------- Reporter: mtb19@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: jython | ----------------------+-------------------------------- Comment (by mtb19@…): Reproduction should have included as its first step: * Remove or set aside all currently installed versions of Java. -- Ticket URL: <https://trac.macports.org/ticket/47036#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#47036: jython installation hardcodes JAVA_HOME such that jython will fail if a user upgrades the Java installation ----------------------+-------------------------------- Reporter: mtb19@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: jython | ----------------------+-------------------------------- Comment (by aaron+macports@…): This issue should be moot with Jython 2.7.0 as the wrapper script has changed to not hard-code `JAVA_HOME`. -- Ticket URL: <https://trac.macports.org/ticket/47036#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#47036: jython installation hardcodes JAVA_HOME such that jython will fail if a user upgrades the Java installation ----------------------+-------------------------------- Reporter: mtb19@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: fixed | Keywords: Port: jython | ----------------------+-------------------------------- Changes (by cal@…): * status: new => closed * resolution: => fixed Comment: Thanks for checking, I'll close this then. It can be re-opened if this still occurs. -- Ticket URL: <https://trac.macports.org/ticket/47036#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts