I've attached a modified version of the postist script for
icedtea-netx_1.5.1

This new version loops through the list of tools and checks if it exist
for each version, adding it to update-alternatives if if does. This
script allows the package to be installed on my machine and seems to set
the correct alternatives.


> $ update-alternatives --query javaws
> Name: javaws
> Link: /usr/bin/javaws
> Slaves:
>  javaws.1.gz /usr/share/man/man1/javaws.1.gz
> Status: auto
> Best: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javaws
> Value: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javaws
> 
> Alternative: /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws
> Priority: 1061
> Slaves:
>  javaws.1.gz /usr/lib/jvm/java-6-openjdk-amd64/jre/man/man1/javaws.1.gz
> 
> Alternative: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javaws
> Priority: 1071
> Slaves:
>  javaws.1.gz /usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/javaws.1.gz
> 
> Alternative: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/javaws
> Priority: 1070
> Slaves:

> $ update-alternatives --query itweb-settings
> Name: itweb-settings
> Link: /usr/bin/itweb-settings
> Slaves:
>  itweb-settings.1.gz /usr/share/man/man1/itweb-settings.1.gz
> Status: auto
> Best: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/itweb-settings
> Value: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/itweb-settings
> 
> Alternative: /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/itweb-settings
> Priority: 1061
> Slaves:
>  itweb-settings.1.gz 
> /usr/lib/jvm/java-6-openjdk-amd64/jre/man/man1/itweb-settings.1.gz
> 
> Alternative: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/itweb-settings
> Priority: 1071
> Slaves:
>  itweb-settings.1.gz 
> /usr/lib/jvm/java-7-openjdk-amd64/jre/man/man1/itweb-settings.1.gz

Honestly, my Bash skill are rather poor so this code needs to be
reviewed before going anywhere. Also, as you can see, I'm using openjdk-7-jre, 
so I've only tested it with that package (not with 6 or 8).

Attachment: icedtea-netx.postinst.in
Description: application/shellscript

Reply via email to