summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-02-21 18:11:36 -0500
committerJoey Hess <joey@gnu.kitenet.net>2010-02-21 18:11:36 -0500
commit00048048303e84604ef52f66070b7b670877ce2a (patch)
tree7d7ac2e0bf79bfc98f9f57968fbfa13e1e1b3d0c
parent064a1f6c7a3e3a224a319b214ed5aa7d552a9680 (diff)
downloaddebhelper-00048048303e84604ef52f66070b7b670877ce2a.tar.gz
dh_install: Now --list-missing and --fail-missing are useful even when not all packages are acted on (due to architecture limits or flags). Closes: #570373
-rw-r--r--debian/changelog3
-rwxr-xr-xdh_install31
2 files changed, 21 insertions, 13 deletions
diff --git a/debian/changelog b/debian/changelog
index b45c52a9..280c82a1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ debhelper (7.4.16) UNRELEASED; urgency=low
* Updated French translation.
* makefile buildsystem: Chomp output during test for full compatability
with debhelper 7.4.11. Closes: #570503
+ * dh_install: Now --list-missing and --fail-missing are useful even when
+ not all packages are acted on (due to architecture limits or flags).
+ Closes: #570373
-- Joey Hess <joeyh@debian.org> Thu, 18 Feb 2010 17:53:27 -0500
diff --git a/dh_install b/dh_install
index 875f80bf..c35c8924 100755
--- a/dh_install
+++ b/dh_install
@@ -126,7 +126,12 @@ my @installed;
my $srcdir = '.';
$srcdir = $dh{SOURCEDIR} if defined $dh{SOURCEDIR};
-foreach my $package (@{$dh{DOPACKAGES}}) {
+foreach my $package (getpackages()) {
+ # Look at the install files for all packages to handle
+ # list-missing/fail-missing, but skip really installing for
+ # packages that are not being acted on.
+ my $skip_install=! grep { $_ eq $package } @{$dh{DOPACKAGES}};
+
my $tmp=tmpdir($package);
my $file=pkgfile($package,"install");
@@ -166,12 +171,16 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
if (! compat(4)) { # check added in v5
- if (! @filelist) {
+ if (! @filelist && ! $skip_install) {
error("$package missing files (@$set), aborting");
}
}
+
foreach my $src (@filelist) {
next if excludefile($src);
+
+ push @installed, $src;
+ next if $skip_install;
if (! defined $dest) {
# Guess at destination directory.
@@ -186,16 +195,6 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
if (! -e "$tmp/$dest") {
doit("install","-d","$tmp/$dest");
}
-
- # Keep track of what's installed.
- if ($dh{LIST_MISSING} || $dh{FAIL_MISSING}) {
- # Kill any extra slashes. Makes the
- # @installed stuff more robust.
- $src=~y:/:/:s;
- $src=~s:/+$::;
- $src=~s:^(\./)*::;
- push @installed, "\Q$src\E\/.*|\Q$src\E";
- }
if (-d $src && $exclude) {
my $basename = basename($src);
@@ -225,7 +224,13 @@ if ($dh{LIST_MISSING} || $dh{FAIL_MISSING}) {
}
my @missing;
- my $installed=join("|", @installed);
+ my $installed=join("|", map {
+ # Kill any extra slashes, for robustness.
+ y:/:/:s;
+ s:/+$::;
+ s:^(\./)*::;
+ "\Q$_\E\/.*|\Q$_\E";
+ } @installed);
$installed=qr{^($installed)$};
find(sub {
-f || -l || return;