[debhelper-devel] [debhelper] 04/04: dh_installdocs: Warn (or error in compat 10) on unsafe binNMUs

Niels Thykier nthykier at moszumanska.debian.org
Mon Dec 29 09:23:26 UTC 2014


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

nthykier pushed a commit to branch master
in repository debhelper.

commit 0d4c889a60c7c4b0a63d1cab176f335056c21964
Author: Bernhard R. Link <brlink at debian.org>
Date:   Mon Dec 29 10:20:09 2014 +0100

    dh_installdocs: Warn (or error in compat 10) on unsafe binNMUs
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debian/changelog |  7 +++++++
 dh_installdocs   | 11 +++++++++++
 2 files changed, 18 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index f5bcd47..59ddfb5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+debhelper (9.20141229) UNRELEASED; urgency=medium
+
+  * Revert detection of unsafe binNMUs under compat 9 and
+    earlier.  It had some false-negatives.  (Closes: #747141)
+
+ -- Niels Thykier <niels at thykier.net>  Mon, 29 Dec 2014 10:21:22 +0100
+
 debhelper (9.20141222) unstable; urgency=medium
 
   * Add missing entry about #747141.
diff --git a/dh_installdocs b/dh_installdocs
index 3eefcdf..a6e63c1 100755
--- a/dh_installdocs
+++ b/dh_installdocs
@@ -158,6 +158,8 @@ init(options => {
 	"link-doc=s" => \$dh{LINK_DOC},
 });
 
+my $called_getpackages = 0;
+
 foreach my $package (@{$dh{DOPACKAGES}}) {
 	next if is_udeb($package);
 	
@@ -166,6 +168,15 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 	my $link_doc=($dh{LINK_DOC} && $dh{LINK_DOC} ne $package);
 
 	if ($link_doc) {
+		getpackages('both') unless $called_getpackages++;
+
+		if (package_arch($package) ne package_arch($dh{LINK_DOC})) {
+			if (compat(9)) {
+				warning("WARNING: --link-doc between architecture all and not all packages breaks binNMUs");
+			} else {
+				error("--link-doc not allowed between ${package} and $dh{LINK_DOC} (one is arch:all and the other not)");
+			}
+		}
 		# Make sure that the parent directory exists.
 		if (! -d "$tmp/usr/share/doc" && ! -l "$tmp/usr/share/doc") {
 			doit("install","-g",0,"-o",0,"-d","$tmp/usr/share/doc");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list