mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 13:10:11 +01:00
contrib/rh-bkr: only consider last packages in repositories
They're hopefully the most recent ones. COPR leaves the old versions in place and Beaker dislikes long packagelists...
This commit is contained in:
parent
682d08328e
commit
2a729bdb78
1 changed files with 4 additions and 2 deletions
|
|
@ -489,10 +489,12 @@ class UploadFileRepo(UploadFile_ParseWebsite):
|
|||
raise Exception("Could not find primary.xml in %s" % self._baseurl + 'repodata/repomd.xml')
|
||||
|
||||
def parse_urls(self, page):
|
||||
for a in re.finditer('href=[\'"]([^\'"]*\.rpm)[\'"]', page):
|
||||
latest = {}
|
||||
for a in re.finditer('href=[\'"]([^\'"]*?([^\'"/]+)-[^\'"-]+-[^\'"-]+\.rpm)[\'"]', page):
|
||||
url = self._baseurl + a.group(1)
|
||||
if self.is_matching_url(url):
|
||||
yield url
|
||||
latest[a.group(2)] = self._baseurl + a.group(1)
|
||||
return latest.values()
|
||||
def raise_no_urls(self):
|
||||
raise Exception("Could not detect any URLs in '%s' repository" % self.uri)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue