From f6095fa5db1e4d277a0660806875375d60286250 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Wed, 3 Jan 2018 01:57:30 +0100 Subject: dpkg-buildpackage: Do not set DEB_GAIN_ROOT_CMD on The specification is clear on this, and we should not be setting this variable when the values are different to "no" and "binary-targets". --- scripts/dpkg-buildpackage.pl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl index 4b3e2b9d6..d790b3177 100755 --- a/scripts/dpkg-buildpackage.pl +++ b/scripts/dpkg-buildpackage.pl @@ -723,6 +723,11 @@ sub parse_rules_requires_root { $ENV{DEB_GAIN_ROOT_CMD} = join ' ', @rootcommand; # XXX: For ephemeral backwards compatibility. $ENV{DPKG_GAIN_ROOT_CMD} = $ENV{DEB_GAIN_ROOT_CMD}; + } else { + # We should not provide the variable otherwise. + delete $ENV{DEB_GAIN_ROOT_CMD}; + # XXX: For ephemeral backwards compatibility. + delete $ENV{DPKG_GAIN_ROOT_CMD}; } return %rrr; -- cgit v1.2.3