diff options
author | Niels Thykier <niels@thykier.net> | 2017-06-24 13:46:51 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2017-06-24 13:48:10 +0000 |
commit | 27061a0d6af7423da786b91a729654245fd69ff5 (patch) | |
tree | 0ef442b7661393a0446737d42f579397f97ae398 | |
parent | cdd4f3fa59e71af36d31ca5c1cf5af1f41c7d7ee (diff) | |
download | debhelper-27061a0d6af7423da786b91a729654245fd69ff5.tar.gz |
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@thykier.net>
-rw-r--r-- | Debian/Debhelper/Dh_Lib.pm | 7 | ||||
-rw-r--r-- | 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 58c13cca..e7ac2d2a 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 a1fad553..d34b2181 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 |