Package: icedtea-netx
Version: 1.5.1-1
Followup-For: Bug #759226

Hi,

The cause of the bug seems to be icedtea-netx.postinst.in file. If you
look into it carefully, it will try to install all alternatives
unconditionally, see below trimmed version for brevity.

There also seems to be a typo on the priority checks. Apparently the
checks don't match code.

[...]

|     for i in $tools; do
|         unset slave1 || true
|         if [ -e $man7dir/man1/$i.$srcext ]; then
|             slave1="--slave \
|                 /usr/share/man/man1/$i.$dstext \
|                 $i.$dstext \
|                 $man7dir/man1/$i.$srcext"
|         fi
|         update-alternatives \

it looks like this should be made conditional (see below)

|             --install \
|             /usr/bin/$i \
|             $i \
|             $base7dir/jre/bin/$i \
|             $priority7 \
|             $slave1
| 
|       # 6's priority is higher, but 6 is not installed, set it to 7
|       if [ $priority -gt $priority7 ] && [ ! -f $base7dir/jre/bin/$i ]; then

it also looks like this is the wrong check. Shouldn't this be:

        if [ $priority -gt $priority7 ] && [ ! -f $basedir/jre/bin/$i ]; then

|           update-alternatives --set $i $base7dir/jre/bin/$i
|       fi
| 
|       # 7's priority is higher, but 7 is not installed, set it to 6
|       if [ $priority7 -gt $priority ] && [ ! -f $basedir/jre/bin/$i ]; then

Shouldn't this be :

        if [ $priority7 -gt $priority ] && [ ! -f $base7dir/jre/bin/$i ]; then

|           update-alternatives --set $i $basedir/jre/bin/$i
|       fi
|     done
| 
|     for i in $tools; do
|         unset slave1 || true
|         if [ -e $man8dir/man1/$i.$srcext ]; then
|             slave1="--slave \
|                 /usr/share/man/man1/$i.$dstext \
|                 $i.$dstext \
|                 $man8dir/man1/$i.$srcext"
|         fi
|         update-alternatives \

this should also be conditional on their respective package being
installed or not. If you just call this update-alternatives line
directly without having openjdk-8 installed, you'll see that it fails
the same way. As a workaround on my machine (needed this working for
VPN) I just commented out openjdk-8 from this postinst script. A better
fix, however, would be to make both loops break early if the respective
package isn't installed; I guess...

|             --install \
|             /usr/bin/$i \
|             $i \
|             $base8dir/jre/bin/$i \
|             $priority8 \
|             $slave1
| 
|       # 7's priority is higher, but 7 is not installed, set it to 8
|       if [ $priority7 -gt $priority8 ] && [ ! -f $base8dir/jre/bin/$i ]; then

shouldn't this one be:

        if [ $priority7 -gt $priority8 ] && [ ! -f $base7dir/jre/bin/$i ]; then

|           update-alternatives --set $i $base8dir/jre/bin/$i
|       fi
| 
|       # 8's priority is higher, but 8 is not installed, set it to 7
|       if [ $priority8 -gt $priority7 ] && [ ! -f $base7dir/jre/bin/$i ]; then

And this, shouldn't it be ?

        if [ $priority8 -gt $priority7 ] && [ ! -f $base8dir/jre/bin/$i ]; then

|           update-alternatives --set $i $base7dir/jre/bin/$i
|       fi
|     done

cheers

-- 
balbi

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages icedtea-netx depends on:
ii  icedtea-netx-common  1.5.1-1
ii  openjdk-7-jre        7u65-2.5.2-4

icedtea-netx recommends no packages.

icedtea-netx suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to