[libjson-pp-perl] 01/02: portrm, preinst: fix name of diverted man page (Closes: #712895)

dod at debian.org dod at debian.org
Mon Oct 20 11:58:58 UTC 2014


This is an automated email from the git hooks/post-receive script.

dod pushed a commit to branch master
in repository libjson-pp-perl.

commit 0f0bd6a483bec3c92e50d66f93dcdf9428acf789
Author: Dominique Dumont <dod at debian.org>
Date:   Mon Oct 20 13:17:22 2014 +0200

    portrm, preinst: fix name of diverted man page (Closes: #712895)
---
 debian/postrm  |  2 +-
 debian/preinst | 12 +++++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/debian/postrm b/debian/postrm
index 0ba4bdf..3b3d42b 100644
--- a/debian/postrm
+++ b/debian/postrm
@@ -8,7 +8,7 @@ then
         --divert /usr/bin/json_pp.bundled /usr/bin/json_pp
 
     dpkg-divert --remove --package libjson-pp-perl --rename \
-        --divert /usr/share/man/man1/json_pp.1.bundled.gz /usr/share/man/man1/json_pp.1.gz
+        --divert /usr/share/man/man1/json_pp.bundled.1.gz /usr/share/man/man1/json_pp.1.gz
 fi
 
 # dh_installdeb will replace this with shell code automatically
diff --git a/debian/preinst b/debian/preinst
index 8db88dd..23733ff 100644
--- a/debian/preinst
+++ b/debian/preinst
@@ -4,6 +4,16 @@ set -e
 
 if [ "$1" = install ] || [ "$1" = upgrade ]
 then
+    # bad divert removal can be deleted in 2017 (after jessie and Ubuntu 16.04 releases)
+    # see #712895
+    BAD=$( dpkg-divert --list /usr/share/man/man1/json_pp.1.bundled.gz | wc -l )
+    if [ "$BAD" = 1 ]
+    then
+        dpkg-divert --remove --package libjson-pp-perl --rename \
+            --divert /usr/share/man/man1/json_pp.1.bundled.gz /usr/share/man/man1/json_pp.1.gz
+    fi
+    # end bad divert removal
+
     dpkg-divert --add --package libjson-pp-perl --rename \
         --divert /usr/bin/json_pp.bundled /usr/bin/json_pp
 
@@ -11,7 +21,7 @@ then
     # because otherwise it takes precedence over json_pp.1p.gz (which we do
     # ship)
     dpkg-divert --add --package libjson-pp-perl --rename \
-        --divert /usr/share/man/man1/json_pp.1.bundled.gz /usr/share/man/man1/json_pp.1.gz
+        --divert /usr/share/man/man1/json_pp.bundled.1.gz /usr/share/man/man1/json_pp.1.gz
 fi
 
 # dh_installdeb will replace this with shell code automatically

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libjson-pp-perl.git



More information about the Pkg-perl-cvs-commits mailing list