[debhelper-devel] [debhelper] 01/01: Dh_Lib: Ignore empty dpkg-architecture ENV variables
Niels Thykier
nthykier at moszumanska.debian.org
Sat Jun 24 13:48:42 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 27061a0d6af7423da786b91a729654245fd69ff5
Author: Niels Thykier <niels at thykier.net>
Date: Sat Jun 24 13:46:51 2017 +0000
Dh_Lib: Ignore empty dpkg-architecture ENV variables
dpkg-architecture ignores them and instead computes the expected value
(as if the variable had not been set in the first place).
Signed-off-by: Niels Thykier <niels at thykier.net>
---
Debian/Debhelper/Dh_Lib.pm | 7 +++++--
debian/changelog | 2 ++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index 58c13cc..e7ac2d2 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -962,9 +962,12 @@ sub excludefile {
sub dpkg_architecture_value {
my $var = shift;
if (exists($ENV{$var})) {
- return $ENV{$var};
+ my $value = $ENV{$var};
+ return $value if $value ne q{};
+ warning("ENV[$var] is set to the empty string. It has been ignored to avoid bugs like #862842");
+ delete($ENV{$var});
}
- elsif (! exists($dpkg_arch_output{$var})) {
+ if (! exists($dpkg_arch_output{$var})) {
# Return here if we already consulted dpkg-architecture
# (saves a fork+exec on unknown variables)
return if %dpkg_arch_output;
diff --git a/debian/changelog b/debian/changelog
index a1fad55..d34b218 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,8 @@ debhelper (10.5) UNRELEASED; urgency=medium
support policy of debhelper compat levels.
* Dh_Lib.pm: Pass ":unix" layer when using the ":gzip" layer due to
PerlIO-gzip bug RT#114557.
+ * Dh_Lib.pm: Ignore empty dpkg-architecture variables.
+ (Closes: #862844)
[ Iain Lane ]
* Dh_Lib: Re-add warning + exit 0 for the -i/-a shortcut that was
--
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