summaryrefslogtreecommitdiff
path: root/scripts/dpkg-source.pl
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2016-06-21 22:40:16 +0200
committerGuillem Jover <guillem@debian.org>2016-07-03 18:44:24 +0200
commitff8c1d6aad5a8976c1f60dff6c2a7fc75f3cfe33 (patch)
tree7915fbc632be2cc03fb88c1bc58039f6a9503cd8 /scripts/dpkg-source.pl
parent0d159ba9b5da8bd5dfcb9e9110ba3e4c2867b0fe (diff)
downloaddpkg-ff8c1d6aad5a8976c1f60dff6c2a7fc75f3cfe33.tar.gz
dpkg-source: Check that debian/tests/control is a regular file
We are parsing the file now, so make sure it's something we can actually work with.
Diffstat (limited to 'scripts/dpkg-source.pl')
-rwxr-xr-xscripts/dpkg-source.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index a9783eb67..7d71e05e1 100755
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@ -504,6 +504,8 @@ sub set_testsuite_field
my $testsuite_field = $fields->{'Testsuite'} // '';
my %testsuite = map { $_ => 1 } split /\s*,\s*/, $testsuite_field;
if (-e "$dir/debian/tests/control") {
+ error(g_('test control %s is not a regular file'),
+ 'debian/tests/control') unless -f _;
$testsuite{autopkgtest} = 1;
} elsif ($testsuite{autopkgtest}) {
warning(g_('%s field contains value %s, but no tests control file %s'),