Skip to content

Commit

Permalink
Simplify epoch extraction logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Oct 27, 2023
1 parent c45ad89 commit cb81ff6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions build_stage_repository
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,7 @@ def download_copr_packages(packages, urls, repository, downloads_dir, included_p
name, version, release = package.rsplit('-', 2)

if name in included_packages:
if ':' in version:
version_without_epoch = version.rsplit(':')[1]
else:
version_without_epoch = version

version_without_epoch = version.rsplit(':', 1)[-1]
name = f"{name}-{version_without_epoch}-{release}.rpm"

for url in urls:
Expand Down

0 comments on commit cb81ff6

Please sign in to comment.