[Reproducible-commits] [debhelper] 04/17: Dh_Lib: Try to use dpkg-architecture variables from the environment
Johannes Schauer
josch at moszumanska.debian.org
Wed Aug 12 08:53:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
josch pushed a commit to branch pu/reproducible_builds
in repository debhelper.
commit 8b314a6659b26f11721680656ead634c673ca801
Author: Guillem Jover <guillem at debian.org>
Date: Fri Jul 24 05:35:18 2015 +0200
Dh_Lib: Try to use dpkg-architecture variables from the environment
This should avoid quite costly calls to dpkg-architecture, when the
user has preinitialized them either through dpkg-buildpackage or
«dpkg-architecture -c debian/rules binary» for example.
Signed-off-by: Guillem Jover <guillem at debian.org>
Signed-off-by: Niels Thykier <niels at thykier.net>
---
Debian/Debhelper/Dh_Lib.pm | 5 ++++-
debian/changelog | 3 +++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index f195367..387f90a 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -763,7 +763,10 @@ sub excludefile {
my %dpkg_arch_output;
sub dpkg_architecture_value {
my $var = shift;
- if (! exists($dpkg_arch_output{$var})) {
+ if (exists($ENV{$var})) {
+ return $ENV{$var};
+ }
+ elsif (! exists($dpkg_arch_output{$var})) {
local $_;
open(PIPE, '-|', 'dpkg-architecture')
or error("dpkg-architecture failed");
diff --git a/debian/changelog b/debian/changelog
index 523f3d1..a6d0d21 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,9 @@ debhelper (9.20150629) UNRELEASED; urgency=medium
* dh_makeshlibs: Avoid an uninitialised warning in some
error cases. Thanks to Jakub Wilk for reporting it.
(Closes: #793092)
+ * Dh_Lib.pm: Apply patch from Guillem Jover to use the
+ value of dpkg-architecture variables from the environment,
+ if present. (Closes: #793440)
-- Niels Thykier <niels at thykier.net> Sun, 28 Jun 2015 15:08:19 +0200
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/debhelper.git
More information about the Reproducible-commits
mailing list