From 2cef6101c02593ca5a948a286313e93b1142cf53 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 20 Mar 2013 11:39:44 -0400 Subject: dh_testdir: Fix error message. Closes: #703515 --- debian/changelog | 1 + dh_testdir | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index ae852e3e..aec1b533 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,6 +30,7 @@ debhelper (9.20120609) UNRELEASED; urgency=low * cmake: Configure with -DCMAKE_BUILD_TYPE=RelWithDebInfo Closes: #701233 * dh_auto_test: Avoid doing anything when cross-compiling. Closes: #703262 + * dh_testdir: Fix error message. Closes: #703515 -- Joey Hess Thu, 05 Jul 2012 08:51:07 -0600 diff --git a/dh_testdir b/dh_testdir index 8e12489a..d7e945b9 100755 --- a/dh_testdir +++ b/dh_testdir @@ -32,10 +32,19 @@ Test for the existence of these files too. =cut +# Run before init because init will try to read debian/control and +# we want a nicer error message. +checkfile('debian/control'); + init(); inhibit_log(); -foreach my $file ('debian/control', @ARGV) { +foreach my $file (@ARGV) { + checkfile($file); +} + +sub checkfile { + my $file=shift; if (! -e $file) { error("\"$file\" not found. Are you sure you are in the correct directory?"); } -- cgit v1.2.3