From 4e2a1bc021f95ccfb17e6f91124fa17bc3dd8d79 Mon Sep 17 00:00:00 2001 From: Will Cooke Date: Thu, 19 Dec 2019 09:26:55 +0000 Subject: [PATCH] Update RPM specific packaging to match RPM naming convention fix: Update RPM specific packaging to match RPM naming convention RPM naming convention says that: 1. We should use dashes not underscores in the package filename 2. We should include a package version (iteration) in the package name This change removes the code which swapped underscores for dashes in the RPM specific code. It also moves the code which removes the package_iteration in to an else block and adds an rpm specific work around to not do that. This was done so that non-rpm builds are not affected by this change. Fixes: #95 --- build.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build.py b/build.py index d682f51e4..0ce0ec7b9 100755 --- a/build.py +++ b/build.py @@ -772,9 +772,10 @@ def package(build_output, pkg_name, version, nightly=False, iteration=1, static= outfile = new_outfile else: if package_type == 'rpm': - # rpm's convert any dashes to underscores - package_version = package_version.replace("-", "_") - new_outfile = outfile.replace("{}-{}".format(package_version, package_iteration), package_version) + # rpm naming convention requires us to include the package_iteration value + new_outfile = outfile + else: + new_outfile = outfile.replace("{}-{}".format(package_version, package_iteration), package_version) os.rename(outfile, new_outfile) outfile = new_outfile outfiles.append(os.path.join(os.getcwd(), outfile))