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

Hi,

I'm attaching a minimal fix to the prerm script that fixes two issues:
* unregister the alternative in prerm remove
* keep the alternative untouched during upgrades - removing and readding
  it everytime could overwrite any user customization.

I intend to NMU this package in a few days with the above patch applied.

Andreas
diff -Nru mg-20110905/debian/changelog mg-20110905/debian/changelog
--- mg-20110905/debian/changelog	2011-09-17 08:15:39.000000000 +0200
+++ mg-20110905/debian/changelog	2013-01-26 15:40:44.000000000 +0100
@@ -1,3 +1,12 @@
+mg (20110905-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * prerm: Preserve the /usr/bin/editor alternative during upgrades and
+    unregister it on package removal.
+    (Closes: #668439)
+
+ -- Andreas Beckmann <[email protected]>  Sat, 26 Jan 2013 15:40:44 +0100
+
 mg (20110905-1) unstable; urgency=low
 
   * New upstream release (Closes: #625385).
diff -Nru mg-20110905/debian/prerm mg-20110905/debian/prerm
--- mg-20110905/debian/prerm	2011-03-01 04:31:30.000000000 +0100
+++ mg-20110905/debian/prerm	2013-01-26 15:36:56.000000000 +0100
@@ -1,6 +1,6 @@
 #!/bin/sh
 set -e
-if test upgrade = "$1"
+if test remove = "$1"
 then update-alternatives --remove editor /usr/bin/mg
 fi
 

Reply via email to