Bug#829008: Corrected patch

2016-06-29 Thread Paul Draper
It seems I omitted part of the patch.

Index: scripts/update-java-alternatives
===
--- scripts/update-java-alternatives (revision 19096)
+++ scripts/update-java-alternatives (working copy)
@@ -109,16 +109,6 @@

 jinfo_files=

-do_auto()
-{
-vecho "resetting java alternatives"
-awk "/$which/ {print \$2}" $top/*.jinfo | sort -u \
- | \
-while read name; do
- update-alternatives $uaopts --auto $name
-done
-}
-
 do_list()
 {
 vecho "listing java alternatives:"
@@ -133,8 +123,6 @@

 do_set()
 {
-do_auto
-
 awk "/$which/ {print}" $jinfo | sort -u \
  | \
 while read type name location; do


Bug#829008: update-java-alternatives always switches back to default

2016-06-29 Thread Paul Draper
Package: java-common
Severity: minor
Tags: patch
Version: 0.51

update-java-alternatives briefly switches back to the default Java version.
This can cause programs to fail during this period of time.

This should be an idempotent operation, as it is for update-alternatives.

See the patch below. I presume that do_auto was at one time important for
something, though I have no idea what it was.

Index: scripts/update-java-alternatives
===
--- scripts/update-java-alternatives (revision 19096)
+++ scripts/update-java-alternatives (working copy)
@@ -109,16 +109,6 @@

 jinfo_files=

-do_auto()
-{
-vecho "resetting java alternatives"
-awk "/$which/ {print \$2}" $top/*.jinfo | sort -u \
- | \
-while read name; do
- update-alternatives $uaopts --auto $name
-done
-}
-
 do_list()
 {
 vecho "listing java alternatives:"