[Reproducible-commits] [debhelper] 07/32: dh_install: Fail late when there were non-existing files
Mattia Rizzolo
mattia at debian.org
Fri Jan 15 00:38:23 UTC 2016
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to branch master
in repository debhelper.
commit 8a9b2f22871f1cd612f4a5660a943dd2ca5d4f24
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date: Tue Jan 5 16:57:16 2016 +0300
dh_install: Fail late when there were non-existing files
Print warnings for each glob that did not match anything, and fail
after processing all packages if there were any missing files.
Closes: #488346
Signed-off-by: Niels Thykier <niels at thykier.net>
---
debian/changelog | 5 +++++
dh_install | 16 +++++++++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index c0dbc06..b50a81d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
debhelper (9.20151225+unreleased) UNRELEASED; urgency=medium
+ [ Niels Thykier ]
* Dh_Lib.pm: Pass "-S" to dpkg-parsechangelog when requesting
the Version field.
* Drop compat level 3.
@@ -7,6 +8,10 @@ debhelper (9.20151225+unreleased) UNRELEASED; urgency=medium
does not start with debian/tmp. This should make the
output on failures less weird.
+ [ Dmitry Shachnev ]
+ * dh_install: Fail because of missing files only after processing
+ all file lists for all packages. (Closes: #488346)
+
-- Niels Thykier <niels at thykier.net> Sat, 26 Dec 2015 20:13:36 +0000
debhelper (9.20151225) unstable; urgency=medium
diff --git a/dh_install b/dh_install
index 7da40d3..9288e86 100755
--- a/dh_install
+++ b/dh_install
@@ -136,6 +136,8 @@ my @installed;
my $srcdir = '.';
$srcdir = $dh{SOURCEDIR} if defined $dh{SOURCEDIR};
+my $missing_files = 0;
+
# PROMISE: DH NOOP WITHOUT install
foreach my $package (getpackages()) {
@@ -180,12 +182,16 @@ foreach my $package (getpackages()) {
if $glob !~ m{^(?:\./)?debian/tmp/};
}
}
- push @filelist, @found;
+ if (@found && (-e $found[0] || -l $found[0])) {
+ push @filelist, @found;
+ }
}
if (! compat(4)) { # check added in v5
if (! @filelist && ! $skip_install) {
- error("$package missing files (@$set), aborting");
+ warning("$package missing files: @$set");
+ ++$missing_files;
+ next;
}
}
@@ -193,7 +199,7 @@ foreach my $package (getpackages()) {
next if excludefile($src);
push @installed, $src;
- next if $skip_install;
+ next if $skip_install or $missing_files;
if (! defined $dest) {
# Guess at destination directory.
@@ -270,6 +276,10 @@ if ($dh{LIST_MISSING} || $dh{FAIL_MISSING}) {
}
}
+if ($missing_files) {
+ error("missing files, aborting");
+}
+
=head1 LIMITATIONS
B<dh_install> cannot rename files or directories, it can only install them
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/debhelper.git
More information about the Reproducible-commits
mailing list