From 9974a6a4d2a5f7d202e7757696672c452c33bce1 Mon Sep 17 00:00:00 2001 From: Marcus Geiger Date: Tue, 9 Feb 2016 18:39:46 +0100 Subject: [PATCH] Fix handling of build.py --pkgarch. --pkgarch overrides the architecture which is used in subsequent runs to build different packages (deb,tar.gz,rpm) and the architecture is used to index the build information kept in a dict, which of course fails if it has been overridden. This commit resets the overridden architecture after each run of fpm to initial, in order to fix the packaging. --- build.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.py b/build.py index afe279510c..1d283b5796 100755 --- a/build.py +++ b/build.py @@ -552,6 +552,7 @@ def build_packages(build_output, version, pkg_arch, nightly=False, rc=None, iter if rc is not None: package_iteration = "0.rc{}".format(rc) + saved_a = a if pkg_arch is not None: a = pkg_arch if a == '386': @@ -568,6 +569,8 @@ def build_packages(build_output, version, pkg_arch, nightly=False, rc=None, iter current_location) if debug: fpm_command += "--verbose " + if pkg_arch is not None: + a = saved_a if package_type == "rpm": fpm_command += "--depends coreutils --rpm-posttrans {}".format(POSTINST_SCRIPT) out = run(fpm_command, shell=True)