On Wed, 09 Sep 2015 22:02:45 +0300, Niko Tyni wrote:

> On Wed, Sep 09, 2015 at 12:30:16AM +0200, gregor herrmann wrote:
> > On Wed, 09 Sep 2015 00:41:07 +0300, Niko Tyni wrote:
> > > I note that this will require changing the symlink
> > > /usr/share/doc/libperl5.22 -> perl to a real separate directory.
> > Once or regularly?
> Not sure how to answer that. It's sort of one-off as we only
> need to handle upgrades from the experimental 5.22 packages.

That would be "once" in my option list above, sorry for the wording
:)

> I guess we could drop it once 5.22 is established in sid/stretch.
> Depends on how much we want/need to support upgrades from experimental.

In practice, upgrades of 5.22 will only happen for a couple of people
in their build chroots; at least I can't imagine anyone having 5.22
installed from experimental in production and upgrading there. And
with the first upload to unstable, the experimental packages get
auto-decrufted. -- But still, I'm all for doing it right even if it
doesn't have a real impact :)

If I'm understanding dpkg-maintscript-helper correctly, it adds
snippets with version checks (if 'prior-version' is set), so the only
maintainance "burden" is to have a debian/libperl5.22.maintscript
file which is written once and doesn't change. -- Or not, since
src:perl doesn't use dh_installdeb.

Anyway, attached is a quick patch (tested in my chroot on an upgrade
from 5.22.0-3).
 

Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Joan Baez: The Boxer
From 2306e138cfaf2f92566cd19554387438d238ca4f Mon Sep 17 00:00:00 2001
From: gregor herrmann <gre...@debian.org>
Date: Thu, 10 Sep 2015 00:12:34 +0200
Subject: [PATCH] Convert /usr/share/doc/libperl5.22 symlink into a directory.

This is needed for binNMU changelogs for the multi-arch:same package.
Cf. #797106.

- add dpkg-maintscript-helper calls to
  debian/libperl5.22.{preinst,postinst,prerm,postrm}
  (src:perl doesn't use dh_installdeb)
- add debian/libperl5.22.docs with debian/changelog and debian/copyright
- drop now unneded lintian override
  (usr-share-doc-symlink-without-dependency)
---
 debian/libperl5.22.docs              | 2 ++
 debian/libperl5.22.lintian-overrides | 2 --
 debian/libperl5.22.postinst          | 5 +++++
 debian/libperl5.22.postrm            | 8 ++++++++
 debian/libperl5.22.preinst           | 8 ++++++++
 debian/libperl5.22.prerm             | 8 ++++++++
 6 files changed, 31 insertions(+), 2 deletions(-)
 create mode 100644 debian/libperl5.22.docs
 delete mode 100644 debian/libperl5.22.lintian-overrides
 mode change 100644 => 100755 debian/libperl5.22.postinst
 create mode 100755 debian/libperl5.22.postrm
 create mode 100755 debian/libperl5.22.preinst
 create mode 100755 debian/libperl5.22.prerm

diff --git a/debian/libperl5.22.docs b/debian/libperl5.22.docs
new file mode 100644
index 0000000..33fbfdc
--- /dev/null
+++ b/debian/libperl5.22.docs
@@ -0,0 +1,2 @@
+debian/changelog	libperl5.22/changelog.Debian
+debian/copyright	libperl5.22/copyright
diff --git a/debian/libperl5.22.lintian-overrides b/debian/libperl5.22.lintian-overrides
deleted file mode 100644
index cca4872..0000000
--- a/debian/libperl5.22.lintian-overrides
+++ /dev/null
@@ -1,2 +0,0 @@
-# see #522827
-usr-share-doc-symlink-without-dependency perl
diff --git a/debian/libperl5.22.postinst b/debian/libperl5.22.postinst
old mode 100644
new mode 100755
index ba7a009..cc65873
--- a/debian/libperl5.22.postinst
+++ b/debian/libperl5.22.postinst
@@ -5,4 +5,9 @@ then
     ldconfig
 fi
 
+if dpkg-maintscript-helper supports symlink_to_dir; then
+    dpkg-maintscript-helper symlink_to_dir \
+        /usr/share/doc/libperl5.22 perl 5.22.0-4~ -- "$@"
+fi
+
 exit 0
diff --git a/debian/libperl5.22.postrm b/debian/libperl5.22.postrm
new file mode 100755
index 0000000..f0275b5
--- /dev/null
+++ b/debian/libperl5.22.postrm
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+if dpkg-maintscript-helper supports symlink_to_dir; then
+    dpkg-maintscript-helper symlink_to_dir \
+        /usr/share/doc/libperl5.22 perl 5.22.0-4~ -- "$@"
+fi
+  
+exit 0
diff --git a/debian/libperl5.22.preinst b/debian/libperl5.22.preinst
new file mode 100755
index 0000000..f0275b5
--- /dev/null
+++ b/debian/libperl5.22.preinst
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+if dpkg-maintscript-helper supports symlink_to_dir; then
+    dpkg-maintscript-helper symlink_to_dir \
+        /usr/share/doc/libperl5.22 perl 5.22.0-4~ -- "$@"
+fi
+  
+exit 0
diff --git a/debian/libperl5.22.prerm b/debian/libperl5.22.prerm
new file mode 100755
index 0000000..f0275b5
--- /dev/null
+++ b/debian/libperl5.22.prerm
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+if dpkg-maintscript-helper supports symlink_to_dir; then
+    dpkg-maintscript-helper symlink_to_dir \
+        /usr/share/doc/libperl5.22 perl 5.22.0-4~ -- "$@"
+fi
+  
+exit 0
-- 
2.5.1

Attachment: signature.asc
Description: Digital Signature

Reply via email to