Followup-For: Bug #685185
Control: tag -1 patch
Hi,
I'm attaching a patch that removes the superfluous and brocken logic
that prevented the removal of the obsolete alternatives to actually
happen.
I did a lot of piuparts upgrade tests from squeeze to wheezy+fixed-jdk6
(with the patch applied to 1.11.5-1) and it solved the issue for all
the about 250-300 packages that are affected by this bug.
I also verified that the patch applied to 1.12.1 (as attached) works
properly.
Please get this fixed in wheezy as leaving broken symlinks in /usr/bin
is really not nice.
Andreas
diffstat for openjdk-6_6b27-1.12.1-2 openjdk-6_6b27-1.12.1-2.1
JB-jre.preinst.in | 5 +----
changelog | 7 +++++++
2 files changed, 8 insertions(+), 4 deletions(-)
diff -u openjdk-6-6b27-1.12.1/debian/JB-jre.preinst.in openjdk-6-6b27-1.12.1/debian/JB-jre.preinst.in
--- openjdk-6-6b27-1.12.1/debian/JB-jre.preinst.in
+++ openjdk-6-6b27-1.12.1/debian/JB-jre.preinst.in
@@ -12,12 +12,9 @@
case "$1" in
upgrade)
+ # cleanup obsolete alternatives
for i in javaws pluginappletviewer; do
- [ -x $old_basedir/jre/bin/$i ] || continue
- dpkg-query -L openjdk-6-jre | grep -q ^$old_basedir/jre/bin/$i && continue
- if [ -n "$(update-alternatives --list $i 2>/dev/null | grep ^$old_basedir/)" ]; then
update-alternatives --remove $i $old_basedir/jre/bin/$i || true
- fi
done
if [ -n "$multiarch" ] && [ -n "$2" ]; then
diff -u openjdk-6-6b27-1.12.1/debian/changelog openjdk-6-6b27-1.12.1/debian/changelog
--- openjdk-6-6b27-1.12.1/debian/changelog
+++ openjdk-6-6b27-1.12.1/debian/changelog
@@ -1,3 +1,10 @@
+openjdk-6 (6b27-1.12.1-2.1) UNRELEASED; urgency=low
+
+ * Non-maintainer upload.
+ * Fix removal of obsolete alternatives. (Closes: #685185)
+
+ -- Andreas Beckmann <[email protected]> Mon, 11 Feb 2013 16:21:07 +0100
+
openjdk-6 (6b27-1.12.1-2) unstable; urgency=high
* d/patches/java-access-bridge-security.patch: Update (Jamie Strandboge).