Followup-For: Bug #986811
Control: tag -1 patch

Hi,

please see the attached patch for cleaning up the obsolete alternative
on upgrades.

Andreas
diff -Nru adios-1.13.1/debian/changelog adios-1.13.1/debian/changelog
--- adios-1.13.1/debian/changelog       2021-03-06 17:35:45.000000000 +0100
+++ adios-1.13.1/debian/changelog       2021-04-23 15:16:48.000000000 +0200
@@ -1,3 +1,9 @@
+adios (1.13.1-29) UNRELEASED; urgency=medium
+
+  * Clean up obsolete alternatives on upgrade.  (Closes: #986811)
+
+ -- Andreas Beckmann <a...@debian.org>  Fri, 23 Apr 2021 15:16:48 +0200
+
 adios (1.13.1-28) unstable; urgency=medium
 
   * postinst/prerm: Ensure generated tags correct.
diff -Nru adios-1.13.1/debian/python3-adios.preinst.in 
adios-1.13.1/debian/python3-adios.preinst.in
--- adios-1.13.1/debian/python3-adios.preinst.in        1970-01-01 
01:00:00.000000000 +0100
+++ adios-1.13.1/debian/python3-adios.preinst.in        2021-04-23 
15:16:44.000000000 +0200
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt-nl "1.13.1-29~" ; 
then
+       update-alternatives --remove-all python-py37-adios-@DEB_HOST_MULTIARCH@
+fi
+
+#DEBHELPER#
diff -Nru adios-1.13.1/debian/rules adios-1.13.1/debian/rules
--- adios-1.13.1/debian/rules   2021-03-06 17:35:45.000000000 +0100
+++ adios-1.13.1/debian/rules   2021-04-23 15:16:48.000000000 +0200
@@ -9,7 +9,7 @@
 AUTOGENERATED:=   adios_config control libadios-bin.postinst  \
                  libadios-mpich-dev.postinst libadios-openmpi-dev.postinst \
                  libadios-mpich-dev.prerm libadios-openmpi-dev.prerm \
-                 python3-adios.postinst python3-adios.prerm
+                 python3-adios.preinst python3-adios.postinst 
python3-adios.prerm
 
 MPI_LIBS_OPENMPI:= $(pkg-config ompi-fort --libs)
 MPI_LIBS_MPICH:= $(pkg-config mpich-fort --libs)

Reply via email to