About Blackdown Java and alternatives

Question

I want to install the ["Java"] runtime 1.4.1 from Blackdown and do

 [apt-get] install j2re1.4 

it escapes with an error message :

 update-alternatives: unable to make /usr/lib/mozilla-cvs/plugins/javaplugin_oji.so.dpkg-tmp 
 a symlink to /etc/alternatives/javaplugin_oji-mozilla-cvs.so: No such file or directory

What is wrong?

Answer

Seems that this error message happen when the directory

 /usr/lib/mozilla-cvs/plugins

does not exist. According to debian-user maillist this has been reported as a bug, but a workaround exist

 mkdir -p /usr/lib/mozilla-cvs/plugins

will make the install procedure continue without problem.

See also:

About pbuilder and Sun's Java SDK

Question

I am build-depending on sun-javaX-jdk. However, I can't get an automatic build in a clean environment working, because sun-javaX-jdk does not install in a non-interactive environment, because it asks for license confirmation:

 Unpacking sun-java6-jdk (from .../sun-java6-jdk_6-06-1_amd64.deb) ...
 sun-dlj-v1-1 license could not be presented
 try 'dpkg-reconfigure debconf' to select a frontend other than noninteractive

Answer

There are two possible answers:

Patch one and for all your pbuilder environment

 $ sudo pbuilder login --save-after-login
 # echo "sun-java5-jdk shared/accepted-sun-dlj-v1-1 boolean true" | debconf-set-selections
 # echo "sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true" | debconf-set-selections
 # exit

Add a hook to patch it on the fly

I use a way to do that "on the fly" because I think it's easier to manage if you have several debconf settings to manage. Just add to your .pbuilderrc:

HOOKDIR=$HOME/debian/pbuilder/hooks

The create a file called i.e. "D50sun-java-licenses" in $HOOKDIR with the following content (it basically has to start with "D" and a two digit number for ordering):

debconf-set-selections <<EOF
sun-java5-jdk shared/accepted-sun-dlj-v1-1 boolean true
´╗┐sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true
EOF

This accepts the licenses before packages are installed. I prefer this because I can deactivate certain settings easily (by commenting out sections or renaming hook files) and do not have to keep a full chroot for every possible debconf setting. Also, I tend to forget which exactly setting I did in which chroot.


CategoryJava