Control: tags -1 +patch

Hi!
Here's a patch (attached).

Because of the bug's severity, and, unlike the cooperate-or-divert issue
recently, the fix being obvious, I intend to NMU by, say, today evening,
unless you say something.  Proposed debdiff attached as well.


Meow!
-- 
A tit a day keeps the vet away.
>From b4653519c5109967be09976e1fbf431316d07dcf Mon Sep 17 00:00:00 2001
From: Adam Borowski <kilob...@angband.pl>
Date: Tue, 8 Mar 2016 05:19:25 +0100
Subject: [PATCH] Remove dangling diverts introduced by 0.20.4-1.

---
 debian/openrc.postinst | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/debian/openrc.postinst b/debian/openrc.postinst
index 4d09a68..cd0284e 100644
--- a/debian/openrc.postinst
+++ b/debian/openrc.postinst
@@ -2,6 +2,19 @@
 
 set -e
 
+# Remove diverts made by 0.20.4-1
+if [ "$(dpkg-divert --list /usr/sbin/invoke-rc.d)" = \
+     "diversion of /usr/sbin/invoke-rc.d to /usr/sbin/invoke-rc.d.init-system-helpers by openrc" ]
+	then dpkg-divert --package openrc --remove --rename \
+		--divert /usr/sbin/invoke-rc.d.init-system-helpers /usr/sbin/invoke-rc.d
+fi
+if [ "$(dpkg-divert --list /usr/sbin/update-rc.d)" = \
+     "diversion of /usr/sbin/update-rc.d to /usr/sbin/update-rc.d.init-system-helpers by openrc" ]
+	then dpkg-divert --package openrc --remove --rename \
+		--divert /usr/sbin/update-rc.d.init-system-helpers /usr/sbin/update-rc.d
+fi
+
+
 if [ "${1}" = "configure" ] ; then
 	echo "Add existing services ..."
 
-- 
2.7.0

diff -Nru openrc-0.20.4/debian/changelog openrc-0.20.4/debian/changelog
--- openrc-0.20.4/debian/changelog      2016-03-04 19:25:52.000000000 +0100
+++ openrc-0.20.4/debian/changelog      2016-03-08 05:18:35.000000000 +0100
@@ -1,3 +1,10 @@
+openrc (0.20.4-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Remove diversions to update-rc.d + invoke-rc.d (Closes: #817006).
+
+ -- Adam Borowski <kilob...@angband.pl>  Tue, 08 Mar 2016 05:17:44 +0100
+
 openrc (0.20.4-2) unstable; urgency=high
 
   * Bump standard to 3.9.7.
diff -Nru openrc-0.20.4/debian/openrc.postinst 
openrc-0.20.4/debian/openrc.postinst
--- openrc-0.20.4/debian/openrc.postinst        2016-03-04 19:25:52.000000000 
+0100
+++ openrc-0.20.4/debian/openrc.postinst        2016-03-08 05:17:41.000000000 
+0100
@@ -2,6 +2,19 @@
 
 set -e
 
+# Remove diverts made by 0.20.4-1
+if [ "$(dpkg-divert --list /usr/sbin/invoke-rc.d)" = \
+     "diversion of /usr/sbin/invoke-rc.d to 
/usr/sbin/invoke-rc.d.init-system-helpers by openrc" ]
+       then dpkg-divert --package openrc --remove --rename \
+               --divert /usr/sbin/invoke-rc.d.init-system-helpers 
/usr/sbin/invoke-rc.d
+fi
+if [ "$(dpkg-divert --list /usr/sbin/update-rc.d)" = \
+     "diversion of /usr/sbin/update-rc.d to 
/usr/sbin/update-rc.d.init-system-helpers by openrc" ]
+       then dpkg-divert --package openrc --remove --rename \
+               --divert /usr/sbin/update-rc.d.init-system-helpers 
/usr/sbin/update-rc.d
+fi
+
+
 if [ "${1}" = "configure" ] ; then
        echo "Add existing services ..."
 

Reply via email to