summaryrefslogtreecommitdiff
path: root/dh_testroot
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2018-02-18 07:50:12 +0000
committerNiels Thykier <niels@thykier.net>2018-02-18 07:50:12 +0000
commite6b3ba49d0e1504966eaeb58dca280ea3c8310bc (patch)
tree4c9a09c73d43ef2d4b87c58f2baa272ee3581220 /dh_testroot
parent9986bc5c1ea30c8c4df51605b4f3916825aa263a (diff)
downloaddebhelper-e6b3ba49d0e1504966eaeb58dca280ea3c8310bc.tar.gz
dh_testroot: root_requirements() no longer read d/control
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'dh_testroot')
-rwxr-xr-xdh_testroot8
1 files changed, 3 insertions, 5 deletions
diff --git a/dh_testroot b/dh_testroot
index 4fbd18fe..fca7cb1a 100755
--- a/dh_testroot
+++ b/dh_testroot
@@ -50,11 +50,9 @@ our $VERSION = DH_BUILTIN_VERSION;
inhibit_log();
-my $requirements = 'legacy-root';
+my $requirements = Debian::Debhelper::Dh_Lib::root_requirements();
-if (-f 'debian/control') {
- $requirements = Debian::Debhelper::Dh_Lib::root_requirements();
-} else {
+if (! -f 'debian/control') {
warning('dh_testroot must be called from the source root');
}
@@ -67,7 +65,7 @@ if ($requirements eq 'legacy-root') {
error("You must run this as root (or use fakeroot).");
} else {
my $env = $ENV{DEB_GAIN_ROOT_CMD};
- error("Package needs targetted root but builder has not provided a gain-root command via \${DEB_GAIN_ROOT_CMD}")
+ error("Package needs targeted root but builder has not provided a gain-root command via \${DEB_GAIN_ROOT_CMD}")
if not $env;
}