[bug-notifications] [firefox 0001892]: pkgrm removes any Java plugin

Mantis Bug Tracker noreply at opencsw.org
Sun May 10 22:51:43 CEST 2009


The following issue has been CLOSED 
====================================================================== 
http://www.opencsw.org/bugtrack/view.php?id=1892 
====================================================================== 
Reported By:                james
Assigned To:                wbonnet
====================================================================== 
Project:                    firefox
Issue ID:                   1892
Category:                   regular use
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             2006-10-28 05:47 CEST
Last Modified:              2009-05-10 22:51 CEST
====================================================================== 
Summary:                    pkgrm removes any Java plugin
Description: 
postinstall copies the java lib to the plugin directory if it can find one.
 preremove *always* removes it irrespective of whether postinstall added
it.  I suggest that if it\'s copied on install then the file is added to
the package with installf(1M) so it is naturally removed on pkgrm.


====================================================================== 

---------------------------------------------------------------------- 
 (0004138) jgoerzen (reporter) - 2006-10-30 12:07
 http://www.opencsw.org/bugtrack/view.php?id=1892#c4138 
---------------------------------------------------------------------- 
CSWfirefox.preremove script updated to check for SUNWj3rt, if it is
installed then remove the symbolic link that was installed during
postinstall.


#!/bin/sh
#
# Blastwave.org Firefox Community Edition preremove script

FIREFOX_VERSION=firefox-2.0

pkginfo -q SUNWj3rt
if [ $? -eq 0 ]; then
rm
/opt/csw/libexec/firefox/lib/${FIREFOX_VERSION}/plugins/libjavaplugin_oji.so
fi

exit 0 

---------------------------------------------------------------------- 
 (0004140) james (reporter) - 2006-10-30 12:31
 http://www.opencsw.org/bugtrack/view.php?id=1892#c4140 
---------------------------------------------------------------------- 
Why not put this in postinstall, then forget about it, ie, no need for
preremove because the link becomes part of the package.

if pkginfo -q SUNWj3rt ; then

	# create the link as now
	#

	ROOT=${PKG_INSTALL_ROOT}
	[ -z \"${ROOT}\" ] && ROOT=/

	installf -R ${ROOT} ${PKGINST} ${PLUGIN_PATH}/libjavaplugin_oji.so s ||
exit 2
	installf -R ${ROOT} -f ${PKGINST} || exit 2
fi



This is slightly better because:
* the state of SUNWj3rt might have changed
* there is no need for a preremove
* the package database knows the link is part of the package

edited on: 10-30 12:31 

---------------------------------------------------------------------- 
 (0004144) james (reporter) - 2006-10-30 18:46
 http://www.opencsw.org/bugtrack/view.php?id=1892#c4144 
---------------------------------------------------------------------- 
postinstall uses SUNWj3rt which is the old 1.4 JDK.  The newer 1.5 package
is called SUNWj5rt and is the one anyone would want (until JDK 6...)

$ pkginfo SUNWj3rt
system      SUNWj3rt J2SDK 1.4 runtime environment
$ pkginfo SUNWj5rt
system      SUNWj5rt JDK 5.0 Runtime Env. (1.5.0_06)

The SUNWj5r plugin is:
/usr/jdk/instances/jdk1.5.0/jre/plugin/$(uname
-p)/ns7/libjavaplugin_oji.so
or using the \"latest\" link:
/usr/jdk/latest/jre/plugin/$(uname -p)/ns7/libjavaplugin_oji.so

or more generally:
${JAVAHOME}/jre/plugin/$(uname -p)/ns7/libjavaplugin_oji.so
because, eg, I generally don\'t use the packaged JRE/JDKs

It might be reliable to use path to the java executable, or another way to
find Java home (ignoring any env var) is to run Java:
$ java JavaHome
/opt/jdk1.5.0_07
$ PLUGIN=`java JavaHome`/jre/plugin/`uname -p`/ns7/libjavaplugin_oji.so


Source:
/**
 * Utility to print the system property java.home value.
 */

public class JavaHome
{
	public static void main(String[] argv)
	{
		String home = System.getProperty(\"java.home\");
		System.out.println(home.substring(0, home.lastIndexOf(\'/\')));		//
remove the \"/jre\"
	}
}


I\'ll try to think of an easy way to check all installed JREs and find the
latest plugin. 

---------------------------------------------------------------------- 
 (0006086) wbonnet (manager) - 2009-05-10 22:51
 http://www.opencsw.org/bugtrack/view.php?id=1892#c6086 
---------------------------------------------------------------------- 
fixed since a few months 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-10 22:51 wbonnet        Note Added: 0006086                          
2009-05-10 22:51 wbonnet        Status                   assigned => closed  
======================================================================




More information about the bug-notifications mailing list