[debhelper-devel] [debhelper] 01/03: dh_install: Guard optimization in a compat bump
Niels Thykier
nthykier at moszumanska.debian.org
Fri Jun 30 06:54:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit c45af8501976aa39e3b0c24f4b960ca6c411978a
Author: Niels Thykier <niels at thykier.net>
Date: Fri Jun 30 06:45:49 2017 +0000
dh_install: Guard optimization in a compat bump
It breaks in the following case:
"bin/l* bin/*s bin"
Assuming debian/tmp/bin contains "ls", then there are now two files to
the same location, which makes cp unhappy. It also happens for
libindicate, where the it have a gtk-2 and gtk-3 variant of files that
happen to clash for similar reasons.
Signed-off-by: Niels Thykier <niels at thykier.net>
---
debhelper.pod | 7 +++++++
debian/changelog | 2 ++
dh_install | 10 ++++++----
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/debhelper.pod b/debhelper.pod
index f0770e1..c8b93cb 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -695,6 +695,13 @@ to drop support for the B<PERL_USE_UNSAFE_INC> environment variable.
When perl drops support for it, then this variable will be removed
retroactively from existing compat levels as well.
+=item -
+
+B<dh_install> now attempts to optimize installations by bulking files
+together. Generally, this should just silently make things faster.
+However, it can cause issues if multiple patterns expand to the same
+target file.
+
=back
=back
diff --git a/debian/changelog b/debian/changelog
index 82abaab..0946d55 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ debhelper (10.6.1) UNRELEASED; urgency=medium
tools) to take filenames as absolute if they started with
a leading slash. Thanks to Sven Joachim for the prompt
discovery and notification. (Closes: #866570)
+ * dh_install: Make optimization conditional on compat 11
+ for now. (Closes: #866405)
-- Niels Thykier <niels at thykier.net> Thu, 29 Jun 2017 19:44:14 +0000
diff --git a/dh_install b/dh_install
index 568337c..41cc506 100755
--- a/dh_install
+++ b/dh_install
@@ -232,10 +232,12 @@ foreach my $package (getpackages()) {
$dest = $common_dest if ($same and $common_dest);
}
if ($dest and @filelist > 1) {
- # Make sure the destination directory exists.
- install_dir("$tmp/$dest");
- xargs(\@filelist, "cp", '--reflink=auto', "-a", XARGS_INSERT_PARAMS_HERE, "$tmp/$dest/");
- next;
+ if (not compat(10)) {
+ # Make sure the destination directory exists.
+ install_dir("$tmp/$dest");
+ xargs(\@filelist, "cp", '--reflink=auto', "-a", XARGS_INSERT_PARAMS_HERE, "$tmp/$dest/");
+ next;
+ }
}
}
--
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