aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHeiko Schlittermann <hs@schlittermann.de>2019-09-29 11:56:33 +0200
committerGuido Günther <agx@sigxcpu.org>2020-10-12 10:25:02 +0200
commitd9e473408e17cb267123e62f6f8b0326fafe2f9a (patch)
tree4967d4bf5c913324a0f46b9d85e42a37bd863fc5
parentc02938fd87042429d6d6102ba55e2b7eee9712f8 (diff)
buildpackage: Honor --git-arch for GBP_CHANGES_FILE
Closes: #941345
-rwxr-xr-xgbp/scripts/buildpackage.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py
index 9b3d67fa..dc86592c 100755
--- a/gbp/scripts/buildpackage.py
+++ b/gbp/scripts/buildpackage.py
@@ -287,7 +287,7 @@ def disable_hooks(options):
setattr(options, hook, '')
-def changes_file_suffix(builder, dpkg_args):
+def changes_file_suffix(builder, dpkg_args, arch):
"""
>>> changes_file_suffix('debuild', ['-A'])
'all'
@@ -306,15 +306,15 @@ def changes_file_suffix(builder, dpkg_args):
elif '-A' in args:
return 'all'
else:
- return os.getenv('ARCH', None) or du.get_arch()
+ return arch or os.getenv('ARCH', None) or du.get_arch()
-def changes_file_name(source, build_dir, builder, dpkg_args):
+def changes_file_name(source, build_dir, builder, dpkg_args, arch):
return os.path.abspath("%s/../%s_%s_%s.changes" %
(build_dir,
source.changelog.name,
source.changelog.noepoch,
- changes_file_suffix(builder, dpkg_args)))
+ changes_file_suffix(builder, dpkg_args, arch)))
def check_branch(repo, options):
@@ -514,7 +514,7 @@ def main(argv):
else source.upstream_version)
export_dir = os.path.join(output_dir, "%s-%s" % (source.sourcepkg, major))
build_dir = export_dir if options.export_dir else repo.path
- changes_file = changes_file_name(source, build_dir, options.builder, dpkg_args)
+ changes_file = changes_file_name(source, build_dir, options.builder, dpkg_args, options.pbuilder_arch)
# Run preexport hook
if options.export_dir and options.preexport: