summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rwxr-xr-xscripts/dpkg-buildpackage.pl5
2 files changed, 7 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index bd41680a4..c6080560c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -26,6 +26,8 @@ dpkg (1.19.1) UNRELEASED; urgency=medium
the variable is expected to be set by any builder, not just dpkg. And
introduce ephemereal backwards compatibility even though there are no
known users.
+ * Do not set DEB_GAIN_ROOT_CMD in dpkg-buildpackage when the R³ value is
+ <implementations-keywords>, following the specification.
* Architecture support:
- Add support for riscv64 CPU. Closes: #822914
Thanks to Manuel A. Fernandez Montecelo <mafm@debian.org>
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;