Package: openjdk-7-jre
Version: 7u75-2.5.4-1
Followup-For: Bug #775072
Hi,
attached is a patch that I verified to clean up correctly on upgrades.
It is intended to be applied for version 7u75-2.5.4-2, if it is applied
to a different version, this needs to be adjusted in
debian/JB-jre.preinst.in.
I'd really appreciate if we could get this cleanup into jessie since
this should be the last package needing to perform alternatives cleanup
from previous releases. And this shows up in 300+ rdepends of
openjdk-6-jre/squeeze.
Andreas
diff -Nru openjdk-7-7u75-2.5.4/debian/JB-jre.preinst.in openjdk-7-7u75-2.5.4/debian/JB-jre.preinst.in
--- openjdk-7-7u75-2.5.4/debian/JB-jre.preinst.in 2014-10-17 02:09:34.000000000 +0200
+++ openjdk-7-7u75-2.5.4/debian/JB-jre.preinst.in 2015-01-24 23:45:38.000000000 +0100
@@ -10,6 +10,18 @@
old_basedir=/usr/lib/jvm/java-7-openjdk
jre_tools='policytool'
+
+case "$1" in
+ install|upgrade)
+ # cleanup obsolete alternatives left by openjdk-6-jre/squeeze
+ if dpkg --compare-versions "$2" lt "7u75-2.5.4-2~"; then
+ for i in javaws pluginappletviewer; do
+ update-alternatives --remove $i /usr/lib/jvm/java-6-openjdk/jre/bin/$i || true
+ done
+ fi
+ ;;
+esac
+
case "$1" in
upgrade)
if [ -n "$multiarch" ] && [ -n "$2" ]; then
diff -Nru openjdk-7-7u75-2.5.4/debian/changelog openjdk-7-7u75-2.5.4/debian/changelog
--- openjdk-7-7u75-2.5.4/debian/changelog 2015-01-23 18:33:40.000000000 +0100
+++ openjdk-7-7u75-2.5.4/debian/changelog 2015-01-24 23:44:18.000000000 +0100
@@ -1,3 +1,10 @@
+openjdk-7 (7u75-2.5.4-2) UNRELEASED; urgency=medium
+
+ * openjdk-7-jre.preinst: Cleanup obsolete alternatives (javaws,
+ pluginappletviewer) left by openjdk-6-jre/squeeze. (Closes: #775072)
+
+ -- Andreas Beckmann <[email protected]> Sat, 24 Jan 2015 23:44:02 +0100
+
openjdk-7 (7u75-2.5.4-1) unstable; urgency=high
* IcedTea7 2.5.4 release (based on OpenJDK 7u75).