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. This > > probably means we need a libperl5.22.preinst snippet that removes the > > symlink on upgrades, as dpkg will not automatically replace a symlink > > with a 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. 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 the former case, dpkg-maintscript-helper(1) makes this easy. Thanks! I see that's a /bin/sh script, so I guess there are no concerns about using it when upgrading perl. Also, perl-base remains usable of course whatever we do with libperl5.22. That would require Pre-Depends: dpkg (>= 1.17.14) in libperl5.22, which presumably isn't a problem as it's satisfied in stable. Do we need to worry about derivatives like Ubuntu and their longer release cycles? Ubuntu 14.04 LTS has dpkg 1.17.5ubuntu5.4 FWIW. In other news, the attached patch seems to be working for the changelog splitting part of this. Eyeballs welcome of course. -- Niko Tyni nt...@debian.org
>From 8442e1d3100c3af5cf88b22ea611c2504a2755f2 Mon Sep 17 00:00:00 2001 From: Niko Tyni <nt...@debian.org> Date: Wed, 9 Sep 2015 14:02:38 +0300 Subject: [PATCH] Split out binary-only changelog entries This emulates what dh_installchangelogs(2 in debhelper does. While this is done for all the binary packages that have separate /usr/share/doc directories, the only one really needing it at the moment is libperl5.22 (which is Multi-Arch:same). Having them also for Architecture:all packages shouldn't matter, they won't get assembled in a binary-only build anyway. Closes: #797106 --- debian/rules | 11 ++++++++++- debian/split-binnmu | 10 ++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 debian/split-binnmu diff --git a/debian/rules b/debian/rules index 51bacb6..19d7712 100755 --- a/debian/rules +++ b/debian/rules @@ -27,6 +27,7 @@ installtype := $(shell /bin/bash debian/config.debian --install-type) test_target := $(shell /bin/bash debian/config.debian --test-target) strip := $(shell /bin/bash debian/config.debian --strip) archtriplet := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) +arch := $(shell dpkg-architecture -qDEB_HOST_ARCH) srcdir := $(shell pwd) packages := $(shell sed -n 's/^Package: *\(.*\)/\1/p' debian/control) build_date := $(shell dpkg-parsechangelog | sed -n -e 's/^Date: //p') @@ -370,7 +371,15 @@ endif do \ d=`echo $$target | sed 's,/[^/]*$$,,'`; \ test -d $$doc/$$d || mkdir -p $$doc/$$d; \ - cp -p $$src $$doc/$$target; \ + if [ "$$src" = "debian/changelog" ] && \ + head -1 $$src | grep -iq 'binary-only=yes'; \ + then \ + # split out binNMU changelog entries \ + debian/split-binnmu $$src > $$doc/$$target \ + 2> $$doc/$${target}.$(arch); \ + else \ + cp -p $$src $$doc/$$target; \ + fi; \ done <debian/$$p.docs; \ fi; \ test -d $$doc/$$p || ln -s perl $$doc/$$p; \ diff --git a/debian/split-binnmu b/debian/split-binnmu new file mode 100755 index 0000000..c05585e --- /dev/null +++ b/debian/split-binnmu @@ -0,0 +1,10 @@ +#!/bin/sed -f +# read a Debian changelog on stdin +# output the first entry on stderr +# output the rest on stdout +1 { h; d } +2,/^perl/ { + /^perl/ { x; w /dev/stderr + x; b } + H;d +} -- 2.1.4