Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RPM specific packaging to match RPM naming convention #2268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("-", "_")
Copy link
Contributor

@nathanielc nathanielc Dec 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm this is not the solution I expected. If it works.... great, it been a while since I touched this code. I believe the reason the - are being replaced is so that what comes after the - doesn't get understood as the release part of the version.

I am likely wrong here, but testing is king.

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))
Expand Down