[Pkg-zsh-devel] Bug#768937: Bug#768937: zsh: [patch] not binNMU-safe due to --link-doc between arch-dep and arch-indep

Axel Beckert abe at debian.org
Wed Nov 12 00:12:05 UTC 2014


Hi Simon,

Axel Beckert wrote:
> Simon McVittie wrote:
> > On 11/11/14 02:10, Axel Beckert wrote:
> > > I'm not yet sure what's the culprit, but after applying your patch
> > > (without the changelog) to the current HEAD of our packging git repo,
> > > the installation of zsh-common always aborts as follows:
> > > 
> > > Preparing to unpack zsh-common_5.0.7-4_all.deb ...
> > > Unpacking zsh-common (5.0.7-4) over (5.0.7-3+0~20141111001757.238~1.gbp353e05) ...
> > > dpkg: error processing archive zsh-common_5.0.7-4_all.deb (--install):
> > >  unable to open '/usr/share/doc/zsh-common/ChangeLog-3.0.gz.dpkg-new': No such file or directory
> > 
> > Huh. Sorry, it worked for me...
> 
> Yeah, I was also surprised. I've built it at least two or three times
> and it was happening reproducibly.

The following patch simplified your solution at the expense of having
most docs under /usr/share/doc/zsh/doc instead of being visible
directly under /usr/share/doc/zsh/ (by /usr/share/doc/zsh/doc being a
symlink to /usr/share/doc/zsh-common/).

https://anonscm.debian.org/cgit/collab-maint/zsh.git/commit/?id=7b632623b115b81dbda65791f6c51a62a1a9e999

>From 7b632623b115b81dbda65791f6c51a62a1a9e999 Mon Sep 17 00:00:00 2001
From: Axel Beckert <abe at deuxchevaux.org>
Date: Wed, 12 Nov 2014 00:25:39 +0100
Subject: Simplify Simon's patch by making /usr/share/doc/zsh/doc a symlink to
 ../zsh-common

Avoids unpack errors probably caused by having _two_ binary packages
containing the directory which was previously a symlink.

diff --git a/debian/rules b/debian/rules
index a82db99..8408b9c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -155,15 +155,6 @@ binary-indep: build-indep binary-arch-dynamic
 	dh_installchangelogs    -pzsh-doc -pzsh-common
 	dh_lintian           -i
 	dh_compress          -i                        -Xpdf
-	set -e; cd debian/zsh-common/usr/share/doc/zsh-common; for x in *; do \
-		case "$$x" in \
-			(copyright|changelog.Debian.gz) \
-				;; \
-			(*) \
-				ln -s ../zsh-common/$$x ../zsh/$$x; \
-				;; \
-		esac; \
-	done
 	dh_fixperms          -i
 	dh_installdeb        -i
 	dh_md5sums           -i
@@ -193,10 +184,6 @@ binary-arch-dynamic: build-arch
 
 	dh_installdocs -pzsh             -pzsh-dbg --link-doc=zsh
 	dh_installchangelogs -pzsh
-	# These are in zsh-common and there is no Policy reason why
-	# they can't be
-	rm -v -f debian/zsh/usr/share/doc/zsh/changelog
-	rm -v -f debian/zsh/usr/share/doc/zsh/NEWS.Debian
 
 binary-arch-static: build-static
 	dh_testdir
diff --git a/debian/zsh-common.dirs b/debian/zsh-common.dirs
index 51addab..bf201bb 100644
--- a/debian/zsh-common.dirs
+++ b/debian/zsh-common.dirs
@@ -1,4 +1,3 @@
 etc/zsh
-usr/share/doc/zsh
 usr/share/man
 usr/share/zsh/help
diff --git a/debian/zsh.links b/debian/zsh.links
new file mode 100644
index 0000000..cb996f2
--- /dev/null
+++ b/debian/zsh.links
@@ -0,0 +1,3 @@
+/usr/share/doc/zsh-common/changelog.gz /usr/share/doc/zsh/changelog.gz
+/usr/share/doc/zsh-common/examples /usr/share/doc/zsh/examples
+/usr/share/doc/zsh-common /usr/share/doc/zsh/doc

I intent to upload a new zsh package with your and this fix tomorrow
evening. One of the reasons for not uploading immediately is that I
want to see if our Jenkins at
http://jenkins.grml.org/view/Debian/job/zsh-binaries/ finds any
issues.


		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5



More information about the Pkg-zsh-devel mailing list