summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2019-03-11 23:21:38 +0100
committerGuillem Jover <guillem@debian.org>2019-03-24 04:17:29 +0100
commit1da502d98ca40a9495172a95a49fdbf0f27ec4de (patch)
treed23f240cf44d20735bc2735bea1f6a0cbf2168ca
parentae3b466f03f30a71b31403dd1696ccda65e7177b (diff)
downloaddpkg-1da502d98ca40a9495172a95a49fdbf0f27ec4de.tar.gz
dpkg-gencontrol: Check presence of package build dir before traversing it
The find() function does not cope well with trying to traverse an unexistent directory and generates various alarming warnings.
-rw-r--r--debian/changelog1
-rwxr-xr-xscripts/dpkg-gencontrol.pl2
2 files changed, 2 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index ea6a844d9..da5802f58 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ dpkg (1.19.6) UNRELEASED; urgency=medium
free()s and the subsequent crashes.
* libdpkg: Handle non end-of-tape errors from tar_header_decode().
* libdpkg: Use ERANGE instead of EINVAL for tar_atol8() out-of-range error.
+ * dpkg-gencontrol: Check presence of package build dir before traversing it.
* Perl modules:
- Dpkg::Source::Package::V1: Change default build option style to -sa.
Using -sA by default means the user might lose data on overwrite if
diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl
index 960043fa2..443217103 100755
--- a/scripts/dpkg-gencontrol.pl
+++ b/scripts/dpkg-gencontrol.pl
@@ -350,7 +350,7 @@ if (!defined($substvars->get('Installed-Size'))) {
$installed_size += 1;
}
};
- find($scan_installed_size, $packagebuilddir);
+ find($scan_installed_size, $packagebuilddir) if -d $packagebuilddir;
$substvars->set_as_auto('Installed-Size', $installed_size);
}