[debhelper-devel] [debhelper] 02/02: dh_testroot: Temporarily cope with being run outside a source root
Niels Thykier
nthykier at moszumanska.debian.org
Sun Oct 22 08:09:00 UTC 2017
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit 0135e7e2f4a5c1874ddd767096b3e36961770785
Author: Niels Thykier <niels at thykier.net>
Date: Sun Oct 22 08:07:18 2017 +0000
dh_testroot: Temporarily cope with being run outside a source root
Signed-off-by: Niels Thykier <niels at thykier.net>
---
debian/changelog | 2 ++
dh_testroot | 8 +++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 6631221..9bfd71b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ debhelper (10.11) UNRELEASED; urgency=medium
* debhelper.pod: Document that all tools by default must be run
in the root of an unpacked source.
* dh: Clarify that --list can be run anywhere.
+ * dh_testroot: Temporarily cope with being run outside a source
+ root. (Closes: #879478)
-- Niels Thykier <niels at thykier.net> Sun, 22 Oct 2017 08:04:11 +0000
diff --git a/dh_testroot b/dh_testroot
index ce1f16c..02b72dd 100755
--- a/dh_testroot
+++ b/dh_testroot
@@ -24,7 +24,13 @@ our $VERSION = DH_BUILTIN_VERSION;
inhibit_log();
-my $requirements = Debian::Debhelper::Dh_Lib::root_requirements();
+my $requirements = 'legacy-root';
+
+if (-f 'debian/control') {
+ $requirements = Debian::Debhelper::Dh_Lib::root_requirements();
+} else {
+ warning('dh_testroot must be called from the source root');
+}
# By declaration; nothing requires root and this command must be a no-op in that case.
exit 0 if $requirements eq 'none';
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list