make-jpkg created deb fails to install for sun-j2re1.6
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.
Selecting previously deselected package sun-j2re1.6.
(Reading database ... 133037 files and directories currently installed.)
Unpacking sun-j2re1.6 (from sun-j2re1.
Setting up sun-j2re1.6 (1.6.0+update18) ...
update-
update-
update-
update-
update-
update-
update-
update-
update-
update-
update-
update-
update-
update-
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/
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/
# netscape
netscape_
[ -d "$netscape_dir" ] || install -d -m 755 "$netscape_dir"
update-alternatives \
--install "$netscape_
"netscape-
"$
commenting this snippet out of the postinst and prerm scripts and creating a new deb allows for clean install/removal.
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 6_1.6.0+ update18_ amd64.deb) ... alternatives: using /usr/lib/ j2re1.6- sun/bin/ ControlPanel to provide /usr/bin/ ControlPanel (ControlPanel) in auto mode. alternatives: warning: skip creation of /usr/share/ man/man1/ ControlPanel. 1.gz because associated file /usr/lib/ j2re1.6- sun/man/ man1/ControlPan el.1.gz (of link group ControlPanel) doesn't exist. alternatives: error: alternative path /usr/lib/ j2re1.6- sun/plugin/ amd64/ns4/ libjavaplugin. so doesn't exist.
Selecting previously deselected package sun-j2re1.6.
(Reading database ... 241813 files and directories currently installed.)
Unpacking sun-j2re1.6 (from sun-j2re1.
Setting up sun-j2re1.6 (1.6.0+update18) ...
update-
update-
update-
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/libjavapl ugin_jni. so.