From 048bde9ad6806cb2f542c82de87a11fded0dd251 Mon Sep 17 00:00:00 2001 From: Daniil Anfimov Date: Wed, 23 Oct 2024 16:23:02 +0200 Subject: [PATCH] Fix regex patterns for cleaning repo names --- alws/release_planner.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/alws/release_planner.py b/alws/release_planner.py index fa4a7385..2454f512 100644 --- a/alws/release_planner.py +++ b/alws/release_planner.py @@ -907,7 +907,7 @@ def __init__(self, db: AsyncSession): self.base_platform = None self.clean_base_dist_name_lower = None self.repo_name_regex = re.compile( - r"\w+-\d-(beta-|)(?P\w+(-\w+)?)" + r"\w+-(\w+-|)+\d+-(beta-|)(?P\w+(-\w+)?)", ) self._beholder_client = BeholderClient(settings.beholder_host) @@ -1179,7 +1179,11 @@ def generate_key(pkg_arch: str) -> BeholderKey: prev_pkg = beholder_cache.get(key, {}) if pkg_repos: for repo in pkg['repositories']: - repo['name'] = re.sub(r'^\w+-\d-(beta-|)', '', repo['name']) + repo['name'] = re.sub( + r'^\w+-(\w+-|)+\d+-(beta-|)', + '', + repo['name'], + ) repo['priority'] = priority pkg['repositories'].extend([ repo