[SCM] Debian packaging of libextutils-parsexs-perl branch, master, updated. upstream/3.040000-71-g9f2c418

gregor herrmann gregoa at debian.org
Thu Dec 22 17:14:34 UTC 2011


The following commit has been merged in the master branch:
commit cbdfc33b2281409887588443b76698fdd9d3ea6a
Author: gregor herrmann <gregoa at debian.org>
Date:   Thu Dec 22 18:01:20 2011 +0100

    Add debian/{preinst,postrm} with diversions for /usr/bin/xsubpp and
    /usr/share/man/man1/xsubpp.1.gz (also shipped in the perl package).

diff --git a/debian/changelog b/debian/changelog
index 8f31ae6..d90570a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,13 +1,5 @@
 libextutils-parsexs-perl (3.080000-1) UNRELEASED; urgency=low
 
-  TODO:
-  - and the real problem: this package now installs /usr/bin/xsubpp and
-    /usr/share/man/man1/xsubpp.1.gz which are also in the perl package.
-    dpkg-divert should be used in the preinst and postrm of this package.
-    See libdevel-dprof-perl for an example, but note that the situation
-    isn't exactly the same because in this case the exact same man
-    page is involved.
-
   * Team upload.
 
   [ Ansgar Burchardt ]
diff --git a/debian/postrm b/debian/postrm
new file mode 100644
index 0000000..68e3bcf
--- /dev/null
+++ b/debian/postrm
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = remove ]
+then
+    dpkg-divert --remove --package libextutils-parsexs-perl --rename \
+        --divert /usr/bin/xsubpp.bundled /usr/bin/xsubpp
+
+    dpkg-divert --remove --package libextutils-parsexs-perl --rename \
+        --divert /usr/share/man/man1/xsubpp.bundled.1.gz /usr/share/man/man1/xsubpp.1.gz
+fi
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/preinst b/debian/preinst
new file mode 100644
index 0000000..9bb17d8
--- /dev/null
+++ b/debian/preinst
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = install ] || [ "$1" = upgrade ]
+then
+    dpkg-divert --add --package libextutils-parsexs-perl --rename \
+        --divert /usr/bin/xsubpp.bundled /usr/bin/xsubpp
+
+    dpkg-divert --add --package libextutils-parsexs-perl --rename \
+        --divert /usr/share/man/man1/xsubpp.bundled.1.gz /usr/share/man/man1/xsubpp.1.gz
+fi
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

-- 
Debian packaging of libextutils-parsexs-perl



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