summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2010-12-17 19:44:05 +0100
committerGuido Günther <agx@sigxcpu.org>2010-12-17 19:53:48 +0100
commit8a46f74fba05a243142cdfda979b15ce76334b57 (patch)
tree1a9bfed7405a3c83cea7f7e3f09f3aa54583c0bb
parent7f8fe4736ff7466ebedc8db81bbd68c7ef5f3eb6 (diff)
downloadgit-buildpackage-8a46f74fba05a243142cdfda979b15ce76334b57.tar.gz
git-buildpackage-8a46f74fba05a243142cdfda979b15ce76334b57.tar.bz2
git-buildpackage-8a46f74fba05a243142cdfda979b15ce76334b57.zip
Favor ARCH environment variable over dpkg's architecture
based on a patch by Jacob Helwig. Closes: #607318
-rwxr-xr-xgit-buildpackage3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-buildpackage b/git-buildpackage
index e37a1ffc..12bb0291 100755
--- a/git-buildpackage
+++ b/git-buildpackage
@@ -407,9 +407,10 @@ def main(argv):
RunAtCommand(options.builder, dpkg_args, shell=True,
extra_env={'GBP_BUILD_DIR': build_dir})(dir=build_dir)
if options.postbuild:
- arch = du.get_arch()
+ arch = os.getenv('ARCH', None) or du.get_arch()
changes = os.path.abspath("%s/../%s_%s_%s.changes" %
(build_dir, cp['Source'], version_no_epoch, arch))
+ gbp.log.debug("Looking for changes file %s" % changes)
if not os.path.exists(changes):
changes = os.path.abspath("%s/../%s_%s_source.changes" %
(build_dir, cp['Source'], version_no_epoch))