From dc2b0a936b2034c589f5ade334f507b7ad69bf8b Mon Sep 17 00:00:00 2001 From: Brendan Early Date: Oct 02 2021 21:53:04 +0000 Subject: Check for package repositories in the development folder on the mirror This lets the script pick up beta and in-development releases marked as active in PDC (e.g. f35). Normally it would ignore these releases but process the update repos anyway since they are not separated on the mirror. --- diff --git a/bin/fetch-repository-dbs.py b/bin/fetch-repository-dbs.py index 88ce8a4..c7968df 100755 --- a/bin/fetch-repository-dbs.py +++ b/bin/fetch-repository-dbs.py @@ -288,11 +288,24 @@ def get_repository_urls_for(product, version): if version == "rawhide": return [(f"{KOJI_REPO}/rawhide/latest/x86_64/repodata", release)] + # Check if package database is in a development location + db_location = ( + "{}/pub/fedora/linux/releases/{}/Everything/x86_64/os/repodata".format( + MIRROR, version + ) + ) + db_check = requests.head(db_location) + if db_check.status_code == 404: + develop_db_location = "{}/pub/fedora/linux/development/{}/Everything/x86_64/os/repodata".format( + MIRROR, version + ) + db_check = requests.head(develop_db_location) + if db_check.status_code != 404: + db_location = develop_db_location + return [ ( - "{}/pub/fedora/linux/releases/{}/Everything/x86_64/os/repodata".format( - MIRROR, version - ), + db_location, release, ), (