Bug#941345: Acknowledgement (git-buildpackage: Option --git-arch ignored when constructing the GBP_CHANGES_FILE variable for the postbuild hook)
control: tags -1 +patch I also met this issue, and verified above patch really works in my environment. So enclose the patch and hope this can be merged into mainline soon. Cheers, -- Roger Shimizu, GMT +9 Tokyo PGP/GPG: 4096R/6C6ACD6417B3ACB1 From: Heiko Schlittermann Date: Sun, 29 Sep 2019 11:56:33 +0200 Subject: [PATCH] No ignore option --git-arch when constructing the GBP_CHANGES_FILE variable for the postbuild hook Closes: #941345 --- gbp/scripts/buildpackage.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py index 9b3d67f..dc86592 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:
Bug#941345: Acknowledgement (git-buildpackage: Option --git-arch ignored when constructing the GBP_CHANGES_FILE variable for the postbuild hook)
A proposed fix follows. But please note, I'm by far not an Python programmer, so I just tried to understand what's going on and introduced the necessary changes. It's of "works for me" quality. :) --- dist-packages/gbp/scripts/buildpackage.py 2019-09-29 11:49:49.928996655 +0200 +++ /tmp/patched2019-09-29 11:49:46.60056 +0200 @@ -284,7 +284,7 @@ setattr(options, hook, '') -def changes_file_suffix(builder, dpkg_args): +def changes_file_suffix(builder, dpkg_args, arch): """ >>> changes_file_suffix('debuild', ['-A']) 'all' @@ -303,15 +303,15 @@ 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): @@ -509,7 +509,7 @@ 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: Best regards from Dresden/Germany Viele Grüße aus Dresden Heiko Schlittermann -- SCHLITTERMANN.de internet & unix support - Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} - gnupg encrypted messages are welcome --- key ID: F69376CE - ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 - signature.asc Description: PGP signature