make-jpkg created deb fails to install for sun-j2re1.6

Bug #512546 reported by sktsee
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
java-package (Ubuntu)
Fix Released
Undecided
Cedric Pineau

Bug Description

Binary package hint: java-package

Using java-package 0.42 in Ubuntu 9.10 to create deb to install Sun jre 1.6.0_18 fails with an error status 2 in the postinst script:

$ sudo dpkg -i sun-j2re1.6_1.6.0+update18_i386.deb
Selecting previously deselected package sun-j2re1.6.
(Reading database ... 133037 files and directories currently installed.)
Unpacking sun-j2re1.6 (from sun-j2re1.6_1.6.0+update18_i386.deb) ...
Setting up sun-j2re1.6 (1.6.0+update18) ...
update-alternatives: using /usr/lib/j2re1.6-sun/bin/ControlPanel to provide /usr/bin/ControlPanel (ControlPanel) in auto mode.
update-alternatives: warning: skip creation of /usr/share/man/man1/ControlPanel.1.gz because associated file /usr/lib/j2re1.6-sun/man/man1/ControlPanel.1.gz (of link group ControlPanel) doesn't exist.
update-alternatives: using /usr/lib/j2re1.6-sun/bin/java to provide /usr/bin/java (java) in auto mode.
update-alternatives: using /usr/lib/j2re1.6-sun/bin/javaws to provide /usr/bin/javaws (javaws) in auto mode.
update-alternatives: using /usr/lib/j2re1.6-sun/bin/keytool to provide /usr/bin/keytool (keytool) in auto mode.
update-alternatives: using /usr/lib/j2re1.6-sun/bin/orbd to provide /usr/bin/orbd (orbd) in auto mode.
update-alternatives: using /usr/lib/j2re1.6-sun/bin/pack200 to provide /usr/bin/pack200 (pack200) in auto mode.
update-alternatives: using /usr/lib/j2re1.6-sun/bin/policytool to provide /usr/bin/policytool (policytool) in auto mode.
update-alternatives: using /usr/lib/j2re1.6-sun/bin/rmid to provide /usr/bin/rmid (rmid) in auto mode.
update-alternatives: using /usr/lib/j2re1.6-sun/bin/rmiregistry to provide /usr/bin/rmiregistry (rmiregistry) in auto mode.
update-alternatives: using /usr/lib/j2re1.6-sun/bin/servertool to provide /usr/bin/servertool (servertool) in auto mode.
update-alternatives: using /usr/lib/j2re1.6-sun/bin/tnameserv to provide /usr/bin/tnameserv (tnameserv) in auto mode.
update-alternatives: using /usr/lib/j2re1.6-sun/bin/unpack200 to provide /usr/bin/unpack200 (unpack200) in auto mode.
update-alternatives: error: alternative path /usr/lib/j2re1.6-sun/plugin/i386/ns4/libjavaplugin.so doesn't exist.
dpkg: error processing sun-j2re1.6 (--install):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 sun-j2re1.6

Problem resides in the post-install script make-jpkg uses when creating the deb package. It tries to create a alternatives symlink for presumably an older version of libjavaplugin.so that Sun does not include any more (or, at least, in this particular jre update).

$ ls -l /usr/lib/j2re1.6/plugins/i386
drwxr-xr-x 2 root root 4096 2010-01-25 15:43 ns7
drwxr-xr-x 2 root root 4096 2010-01-25 15:43 ns7-gcc2

No ns4 directory exists. Therefore, this bit from /usr/share/java-package/sun-j2re1.6/install fails:
# netscape
netscape_dir="/usr/lib/netscape/plugins-libc6"
[ -d "$netscape_dir" ] || install -d -m 755 "$netscape_dir"
update-alternatives \
   --install "$netscape_dir/libjavaplugin.so" \
 "netscape-javaplugin.so" \
     "$plugin_dir/ns4/libjavaplugin.so" "$priority"

commenting this snippet out of the postinst and prerm scripts and creating a new deb allows for clean install/removal.

Revision history for this message
michael37 (misha37) wrote :

Using java-package 0.42 in Ubuntu 9.10 to create deb to install Sun jre 1.6.0_18.

It fails sooner for me.

$ sudo dpkg -i sun-j2re1.6_1.6.0+update18_amd64.deb
Selecting previously deselected package sun-j2re1.6.
(Reading database ... 241813 files and directories currently installed.)
Unpacking sun-j2re1.6 (from sun-j2re1.6_1.6.0+update18_amd64.deb) ...
Setting up sun-j2re1.6 (1.6.0+update18) ...
update-alternatives: using /usr/lib/j2re1.6-sun/bin/ControlPanel to provide /usr/bin/ControlPanel (ControlPanel) in auto mode.
update-alternatives: warning: skip creation of /usr/share/man/man1/ControlPanel.1.gz because associated file /usr/lib/j2re1.6-sun/man/man1/ControlPanel.1.gz (of link group ControlPanel) doesn't exist.
update-alternatives: error: alternative path /usr/lib/j2re1.6-sun/plugin/amd64/ns4/libjavaplugin.so doesn't exist.
dpkg: error processing sun-j2re1.6 (--install):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 sun-j2re1.6

In addition to producing this error, I am using Firefox 3.6. Due to changes in Firefox 3.6, NPAPI version of the plugin is required. Which means I have to use /usr/lib/j2re1.6-sun/lib/amd64/libnpjp2.so instead of /usr/lib/j2re1.6-sun/lib/amd64/libjavaplugin_jni.so.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in java-package (Ubuntu):
status: New → Confirmed
Revision history for this message
Cedric Pineau (cedric-pineau) wrote :

This has been fixed with java-package 0.50

Cédric

Changed in java-package (Ubuntu):
status: Confirmed → Fix Released
assignee: nobody → Cedric Pineau (cedric-pineau)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.