From 55a13246144c310eff14f5765a960f6338f53ec7 Mon Sep 17 00:00:00 2001 From: Daniel Milnes Date: Mar 21 2025 00:53:43 +0000 Subject: [PATCH 1/2] Update Variable Type to Handle EPEL10 Branching EPEL10 has started branching and doing point releases. The current variable parsing doesn't handle this, so swap from an `int` to a `float` when doing version comparisons. --- diff --git a/bin/fetch-repository-dbs.py b/bin/fetch-repository-dbs.py index 72fc243..422ee36 100755 --- a/bin/fetch-repository-dbs.py +++ b/bin/fetch-repository-dbs.py @@ -336,7 +336,7 @@ def get_repository_urls_for(product, version): release + "-updates-testing", ), ] - elif product == "FEDORA-EPEL" and int(version) < 8: + elif product == "FEDORA-EPEL" and float(version) < 8: release = "epel-{}".format(version).lower() return [ ("{}/pub/epel/{}/x86_64/repodata/".format(MIRROR, version), release), @@ -345,7 +345,7 @@ def get_repository_urls_for(product, version): release + "-testing", ), ] - elif product == "FEDORA-EPEL" and int(version) >= 8: + elif product == "FEDORA-EPEL" and float(version) >= 8: release = "epel-{}".format(version).lower() return [ ( From d9c2cf3d0d07bbb165de164e8a63cc7d8ae233d4 Mon Sep 17 00:00:00 2001 From: Peter Li Date: Apr 03 2025 03:33:16 +0000 Subject: [PATCH 2/2] Fix database regex patterns EPEL versions can be floating point numbers, so "." must be a part of the version regex. --- diff --git a/bin/generate-html.py b/bin/generate-html.py index c929cdb..ed7fe7e 100755 --- a/bin/generate-html.py +++ b/bin/generate-html.py @@ -146,7 +146,7 @@ def main(): # Group databases files. databases = defaultdict(dict) db_pattern = re.compile( - "^(fedora|epel)-([\\w|-]+)_(primary|filelists|other).sqlite$" + r"^(fedora|epel)-([\w|.-]+)_(primary|filelists|other).sqlite$" ) for db in os.listdir(DBS_DIR): if not db_pattern.match(db): @@ -164,7 +164,7 @@ def main(): partial_update = False removed_packages = set() changelog_mail_pattern = re.compile("<(.+@.+)>") - release_branch_pattern = re.compile("^([fedora|epel]+-[\\w|\\d]+)-?([a-z|-]+)?$") + release_branch_pattern = re.compile(r"^([fedora|epel]+-[\w|\d.]+)-?([a-z|-]+)?$") for release_branch in databases.keys(): print("> Processing database files for {}.".format(release_branch)) diff --git a/bin/update-solr.py b/bin/update-solr.py index 7c67bd1..616ac2a 100755 --- a/bin/update-solr.py +++ b/bin/update-solr.py @@ -89,7 +89,7 @@ def main(): # Group databases files. databases = {} db_pattern = re.compile( - "^(fedora|epel)-([\w|-]+)_(primary|filelists|other).sqlite$" + r"^(fedora|epel)-([\w|.-]+)_(primary|filelists|other).sqlite$" ) for db in os.listdir(DBS_DIR): if not db_pattern.match(db): @@ -108,7 +108,7 @@ def main(): packages_count = 0 srpm_pattern = re.compile("^(.+)-.+-.+.src.rpm$") changelog_mail_pattern = re.compile("<(.+@.+)>") - release_branch_pattern = re.compile("^([fedora|epel]+-[\w|\d]+)-?([a-z|-]+)?$") + release_branch_pattern = re.compile(r"^([fedora|epel]+-[\w.]+)-?([a-z|-]+)?$") for release_branch in databases.keys(): print("> Processing database files for {}.".format(release_branch))