JDK-5047507 : javaws not correctly maintained in 1.4.2_05 b2 (internal)
  • Type: Bug
  • Component: install
  • Sub-Component: install
  • Affected Version: 1.4.2_05
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: generic
  • Submitted: 2004-05-14
  • Updated: 2008-09-22
  • Resolved: 2004-05-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2_05 05Fixed
Related Reports
Relates :  
Description
An error in the implementation of:
	5010244: PSARC/2003/321 needs to be backported to 1.4.2_05
the /usr/bin/javaws symbolic link is not correctly managed.  Since even
the initial setting is incorrect, this must be fixed before 1.4.2_05
is general availabilty.


###@###.### 2004-05-28

	I also ran into this during s9u7_06 install regression test.  The link is broken and this must be fixed  before s9u7 ships.


###@###.### 2004-07-01

	This is fixed in s9u7_09 with Java 1.4.2_05.


Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.2_05 FIXED IN: 1.4.2_05 INTEGRATED IN: 1.4.2_05 VERIFIED IN: 1.4.2_05
03-07-2004

EVALUATION In the process of backporting the mJRE work to 1.4.2_05, the settings of REL_JAVAWS_* in the installation scripts was incorrectly implemented. In the process of enhancing the tests to not allow this to happen again a few other (far less serious) bugs were discovered in the handling of the /usr/bin/javaws symbolic link.
03-07-2004

WORK AROUND Assuming a default installation: # rm /usr/bin/javaws # ln -s ../java/jre/javaws/javaws Non-default installations will have a different value of the "java" field in the link.
03-07-2004

SUGGESTED FIX ------- postcommon ------- 58,59c58,59 < # See 4954937: Once this is fixed (before we ship this error!), this < # should be: --- > # This is the final desired (preferred) location. 1.4.2, doesn't have > # it. It only has /jre/javaws/javaws. 61,65c61 < # REL_JAVAWS="/bin/javaws" < # < # Until then we have: < # < REL_JAVAWS="/jre/bin/javaws" --- > REL_JAVAWS="/bin/javaws" 71c67 < REL_JAVAWS_GOOFY="/bin/javaws" --- > REL_JAVAWS_GOOFY="/jre/bin/javaws" ------- postinstall ------- 95,112c95,110 < ${LN} -s ../java${REL_JAVAWS} ${PKG_INSTALL_ROOT}${BIN_JAVAWS} < elif [ \( \( ! -f ${PKG_INSTALL_ROOT}${BIN_JAVAWS} -a < ! -d ${PKG_INSTALL_ROOT}${BIN_JAVAWS} \) -o < \( -h ${PKG_INSTALL_ROOT}${BIN_JAVAWS} -a < ! -x ${PKG_INSTALL_ROOT}${BIN_JAVAWS} \) \) -a < "$BASEDIR" = "${PKG_INSTALL_ROOT}/usr" ]; then < ${RM} -f ${PKG_INSTALL_ROOT}${BIN_JAVAWS} < ${LN} -s ../java${REL_JAVAWS} ${PKG_INSTALL_ROOT}${BIN_JAVAWS} < elif [ -h ${PKG_INSTALL_ROOT}${BIN_JAVAWS} ]; then < ls=`ls -l ${PKG_INSTALL_ROOT}${BIN_JAVAWS}"` < link=`echo $ls | cut -f 11 -d " "` < path=`echo $link | sed -e "s:${REL_JAVAWS}$::" -e "s:^\.\.:/usr:"` < old=`FollowLink $path` < new=`FollowLink ${USR_JAVA}` < if [ "$old" = "$new" ]; then < ${RM} -f ${PKG_INSTALL_ROOT}${BIN_JAVAWS} < ${LN} -s ../java${REL_JAVAWS} ${PKG_INSTALL_ROOT}${BIN_JAVAWS} < fi --- > ${LN} -s ../java${REL_JAVAWS_OLD} ${PKG_INSTALL_ROOT}${BIN_JAVAWS} > elif [ "$BASEDIR" = "${PKG_INSTALL_ROOT}/usr" ]; then > if [ ! -f ${PKG_INSTALL_ROOT}${BIN_JAVAWS} ] && > [ ! -h ${PKG_INSTALL_ROOT}${BIN_JAVAWS} ] && > [ ! -d ${PKG_INSTALL_ROOT}${BIN_JAVAWS} ]; then > ${RM} -f ${PKG_INSTALL_ROOT}${BIN_JAVAWS} > ${LN} -s ../jdk/${INSTALL_DIR}${REL_JAVAWS_OLD} > ${PKG_INSTALL_ROOT}${BIN_JAVAWS} > elif [ -h ${PKG_INSTALL_ROOT}${BIN_JAVAWS} ]; then > target=`FollowLink ${PKG_INSTALL_ROOT}${BIN_JAVAWS}` > if [ ! -x $target ]; then > ${RM} -f ${PKG_INSTALL_ROOT}${BIN_JAVAWS} > ${LN} -s ../jdk/${INSTALL_DIR}${REL_JAVAWS_OLD} > ${PKG_INSTALL_ROOT}${BIN_JAVAWS} > fi > fi ------- postremove ------- 243a244,245 > > # 252a255 > 254,255d256 < fi < fi 257,262c258,277 < # < # Due to PSARC/2003/091, it is possible that the /usr/bin/javaws now < # needs to be adjusted. Only perform these adjustments if they are < # the result of this package removal. < # < if [ -h ${PKG_INSTALL_ROOT}${BIN_JAVAWS} ]; then --- > # > # Due to PSARC/2003/091, it is possible that the /usr/bin/javaws now > # needs to be adjusted. Only perform these adjustments if they are > # the result of this package removal. > # > # 1.If the default now contains a valid javaws, point the link back to > # the default (through /usr/java). > # > # Due to psarc/2003/091 and 4954923, there are multiple places to > # search # for javaws. > # > if [ -x ${PKG_INSTALL_ROOT}${USR_JAVA}${REL_JAVAWS} ]; then > ${RM} -f ${PKG_INSTALL_ROOT}${BIN_JAVAWS} > ${LN} -s ../java${REL_JAVAWS} ${PKG_INSTALL_ROOT}${BIN_JAVAWS} > elif [ -x ${PKG_INSTALL_ROOT}${USR_JAVA}${REL_JAVAWS_GOOFY} ]; then > ${RM} -f ${PKG_INSTALL_ROOT}${BIN_JAVAWS} > ${LN} -s ../java${REL_JAVAWS_GOOFY} ${PKG_INSTALL_ROOT}${BIN_JAVAWS} > elif [ -x ${PKG_INSTALL_ROOT}${USR_JAVA}${REL_JAVAWS_OLD} ]; then > ${RM} -f ${PKG_INSTALL_ROOT}${BIN_JAVAWS} > ${LN} -s ../java${REL_JAVAWS_OLD} ${PKG_INSTALL_ROOT}${BIN_JAVAWS} 264,282c279,296 < # < # 1.If the default now contains a valid javaws, point the link back to < # the default (through /usr/java). < # < # Note that step 1 also cleans up early implementations which incorrectly < # went through ../j2se rather than ../java. < # < # Due to psarc/2003/091 and 4954923, there are multiple places to search < # for javaws. < # < if [ -x ${PKG_INSTALL_ROOT}${USR_JAVA}${REL_JAVAWS_GOOFY} ]; then < ${RM} -f ${PKG_INSTALL_ROOT}${BIN_JAVAWS} < ${LN} -s ../java${REL_JAVAWS_GOOFY} ${PKG_INSTALL_ROOT}${BIN_JAVAWS} < elif [ -x ${PKG_INSTALL_ROOT}${USR_JAVA}${REL_JAVAWS} ]; then < ${RM} -f ${PKG_INSTALL_ROOT}${BIN_JAVAWS} < ${LN} -s ../java${REL_JAVAWS} ${PKG_INSTALL_ROOT}${BIN_JAVAWS} < elif [ -x ${PKG_INSTALL_ROOT}${USR_JAVA}${REL_JAVAWS_OLD} ]; then < ${RM} -f ${PKG_INSTALL_ROOT}${BIN_JAVAWS} < ${LN} -s ../java${REL_JAVAWS_OLD} ${PKG_INSTALL_ROOT}${BIN_JAVAWS} --- > # > # 2.Failing the above, if the link is now dangling removal of this > # package, then scan all the available JREs for one with an > # appropriate javaws. Try to choose the one with the most > # correct name, and from amont those, try to choose the oldest. > # Note that the oldest, must be newer than the default, so this > # is "closest approximation"). > # > else > if FixDangle ${REL_JAVAWS}; then > exit 0 > fi > if FixDangle ${REL_JAVAWS_GOOFY}; then > exit 0 > fi > if FixDangle ${REL_JAVAWS_OLD}; then > exit 0 > fi 284,294c298,301 < # < # 2.Failing the above, if the link is now dangling removal of this < # package, then scan all the available JREs for one with an < # appropriate javaws. Try to choose the one with the most < # correct name, and from amont those, try to choose the oldest. < # Note that the oldest, must be newer than the default, so this < # is "closest approximation"). < # < elif [ ! -x ${BIN_JAVAWS} ]; then < if FixDangle $path ${REL_JAVAWS_GOOFY}; then < exit 0 --- > # > # Nothng to point at. Nuke it! > # > ${RM} -f ${PKG_INSTALL_ROOT}${BIN_JAVAWS} 296,308d302 < if FixDangle $path ${REL_JAVAWS}; then < exit 0 < fi < if FixDangle $path ${REL_JAVAWS_OLD}; then < exit 0 < fi < ${RM} -f ${PKG_INSTALL_ROOT}${BIN_JAVAWS} < < # < # 3. Nothng to point at. Nuke it! < # < else < ${RM} -f ${PKG_INSTALL_ROOT}${BIN_JAVAWS}
03-07-2004

PUBLIC COMMENTS Internal development (never released)
03-07-2004