Skip to content

Commit 4546b00

Browse files
authored
Support new OpenStack upstream pkg name format (#42)
Support new format: https://releases.openstack.org/{pkg_name}/{pkg_name}-{release-version}-last.tar.gz
1 parent 21ec9f6 commit 4546b00

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

VersionStatus.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,19 @@ def __init__(self, _os_ver_uri):
203203
@property
204204
def upstream_versions(self):
205205
# get all links, which ends .tar.gz from HTML
206+
# regular package format: https://releases.openstack.org/
207+
# {pkg_name}/{pkg_name}-{pkg-version}.tar.gz
208+
# a new format is added at 2022-12: https://releases.openstack.org/
209+
# {pkg_name}/{pkg_name}-{release-version}-last.tar.gz
206210
links = re.findall(r'https://.*\.tar\.gz', self.url_os_content)
207211
results = dict()
208212
for pkg_link in links:
209213
# get name and package information from link
210214
tmp = pkg_link.split("/")
211215
pkg_full_name = tmp[4]
216+
# can not get pkg version from url, just ignore it
217+
if pkg_full_name.endswith('-last.tar.gz'):
218+
continue
212219
pkg_name = pkg_full_name[0:pkg_full_name.rfind('-')]
213220
pkg_ver = pkg_full_name[
214221
pkg_full_name.rfind('-') + 1:pkg_full_name.rfind('.tar')]

0 commit comments

Comments
 (0)