Control: tags -1 + patch

On 2017-07-17 11:24 +0300, Adrian Bunk wrote:

> Package: debhelper
> Version: 10.6.4
> Severity: serious
> Control: affects -1 src:cccc
>
> https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/cccc.html
>
> ...
>    debian/rules override_dh_installdocs
> make[1]: Entering directory '/build/1st/cccc-3.1.4'
> dh_installdocs 'cccc/CCCC User Guide.html'
> cp: cannot stat 'cccc/CCCC': No such file or directory
> dh_installdocs: cp --reflink=auto -a cccc/CCCC debian/cccc/usr/share/doc/cccc 
> returned exit code 1
> debian/rules:41: recipe for target 'override_dh_installdocs' failed
> make[1]: *** [override_dh_installdocs] Error 2
>
>
> Works with debhelper 10.2.5, FTBFS with 10.6.4

The culprit is commit d00d7d524f874c which fixed the changed behavior in
dh_install (see #867866) but overzealously also touched a few other
utilities like dh_installdocs.  It turns out that these programs
actually treated an argument like 'foo bar' as a single file in 10.2.5,
and obviously there are a few packages which rely on that.

Attached is a patch to revert these programs to their previous behavior.

Cheers,
       Sven

>From 91d23c5cb9af4694b018bc2fd219da0dfa941f9d Mon Sep 17 00:00:00 2001
From: Sven Joachim <svenj...@gmx.de>
Date: Thu, 20 Jul 2017 20:46:26 +0200
Subject: [PATCH] Revert to the pre-10.6.4 behavior for dh_installdocs and the
 like

It turned out that "dh_installdocs 'foo bar'" has historically treated
the argument as a single file rather than two, and packages were
relying on it, since there is really no other way to install such a
file with dh_installdocs.  Hence commit d00d7d524f8 broke them.

The situation for dh_installexamples, dh_installman and dh_installinfo
is exactly the same.

That dh_install has behaved differently in this respect is
unfortunate, but can only be fixed in a new compat level.
---
 dh_installdocs     | 3 +--
 dh_installexamples | 3 +--
 dh_installinfo     | 3 +--
 dh_installman      | 3 +--
 4 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/dh_installdocs b/dh_installdocs
index 7b81e008..bb2616c1 100755
--- a/dh_installdocs
+++ b/dh_installdocs
@@ -235,8 +235,7 @@ foreach my $package (getpackages()) {
 	}
 
 	if (($package eq $dh{FIRSTPACKAGE} || ($dh{PARAMS_ALL} && !$link_doc)) && @ARGV) {
-		# The split is for bug-backwards compatibility (#867866).
-		push(@docs, map { split } @ARGV);
+		push @docs, @ARGV;
 	}
 
 	log_installed_files($package, @docs);
diff --git a/dh_installexamples b/dh_installexamples
index 79e68020..6f0e8068 100755
--- a/dh_installexamples
+++ b/dh_installexamples
@@ -100,8 +100,7 @@ foreach my $package (getpackages()) {
 	}	
 
 	if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
-		# The split is for bug-backwards compatibility (#867866).
-		push(@examples, map { split } @ARGV);
+		push @examples, @ARGV;
 	}
 
 	log_installed_files($package, @examples);
diff --git a/dh_installinfo b/dh_installinfo
index ff9bbe21..dbef7de6 100755
--- a/dh_installinfo
+++ b/dh_installinfo
@@ -83,8 +83,7 @@ foreach my $package (getpackages()) {
 	}
 
 	if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
-		# The split is for bug-backwards compatibility (#867866).
-		push(@info, map { split } @ARGV);
+		push @info, @ARGV;
 	}
 
 	next if not process_pkg($package) or $nodocs;
diff --git a/dh_installman b/dh_installman
index f61d7e62..1740a5d7 100755
--- a/dh_installman
+++ b/dh_installman
@@ -161,8 +161,7 @@ on_items_in_parallel(\@all_packages, sub {
 		@manpages = filearray($file, \@search_dirs, $error_handler) if $file;
 
 		if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
-			# The split is for bug-backwards compatibility (#867866).
-			push(@manpages, map { split } @ARGV);
+			push @manpages, @ARGV;
 		}
 
 		log_installed_files($package, @manpages);
-- 
2.13.3

Reply via email to