bodhi/backend: use major version to construct EPEL latest link
The latest epel-release symlink name is constructed by parsing the fifth digit out of the release. That was never going to work when we reached a double digit major version. It is resulting in a symlink of epel-release-latest-1.noarch.rpm for epel10.0. Instead, let's switch it to use the version value (without the minor version) from the release. Signed-off-by: Carl George <carlwgeorge@gmail.com>
This commit is contained in:
parent
58f307cb46
commit
03749f705c
1 changed files with 3 additions and 2 deletions
|
@ -482,14 +482,15 @@ def update_epel_release_latest(releases):
|
||||||
"""
|
"""
|
||||||
for release in releases:
|
for release in releases:
|
||||||
if 'epel' in release:
|
if 'epel' in release:
|
||||||
|
major = RELEASES[release]['version'].split('.')[0]
|
||||||
if 'next' in RELEASES[release]['repos']['epel']['to'][0]['dest']:
|
if 'next' in RELEASES[release]['repos']['epel']['to'][0]['dest']:
|
||||||
dest = '/pub/epel/epel-next-release-latest-' + release[4] + '.noarch.rpm'
|
dest = '/pub/epel/epel-next-release-latest-' + major + '.noarch.rpm'
|
||||||
# For next's epel release, use the subpackage rpm from epel repo instead of
|
# For next's epel release, use the subpackage rpm from epel repo instead of
|
||||||
# epel next repo
|
# epel next repo
|
||||||
release = release[:-1]
|
release = release[:-1]
|
||||||
path, pkg_relpath = get_epel_release_rel_path(release, True)
|
path, pkg_relpath = get_epel_release_rel_path(release, True)
|
||||||
else:
|
else:
|
||||||
dest = '/pub/epel/epel-release-latest-' + release[4] + '.noarch.rpm'
|
dest = '/pub/epel/epel-release-latest-' + major + '.noarch.rpm'
|
||||||
path, pkg_relpath = get_epel_release_rel_path(release)
|
path, pkg_relpath = get_epel_release_rel_path(release)
|
||||||
|
|
||||||
if os.path.lexists(dest) and os.path.islink(dest):
|
if os.path.lexists(dest) and os.path.islink(dest):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue