@@ -180,6 +180,7 @@ def process_osv_data(
180180 osv_distr_mapping = {
181181 "AlmaLinux-8" : "AlmaLinux:8" ,
182182 "AlmaLinux-9" : "AlmaLinux:9" ,
183+ "AlmaLinux-10" : "AlmaLinux:10" ,
183184 }
184185 self .logger .debug ("Generating OSV data" )
185186 osv_target_dir = os .path .join (
@@ -575,7 +576,6 @@ def export_errata_and_oval(
575576def extract_errata_from_exported_paths (
576577 exporter : PackagesExporter ,
577578 exported_paths : List [str ],
578- platform_regex : re .Pattern ,
579579) -> dict :
580580 platform_errata_cache = {}
581581 with ThreadPoolExecutor (max_workers = 4 ) as executor :
@@ -593,9 +593,12 @@ def extract_errata_from_exported_paths(
593593 "Extracted errata records from %s" ,
594594 repo_path ,
595595 )
596- platform = "AlmaLinux-8"
597- if platform_regex .search (repo_path ):
598- platform = "AlmaLinux-9"
596+ repo_match = re .search (r"/(almalinux|vault)/(\d+)/" , repo_path )
597+ if repo_match :
598+ version = repo_match .group (2 )
599+ platform = f"AlmaLinux-{ version } "
600+ else :
601+ platform = "AlmaLinux-8"
599602 if platform not in platform_errata_cache :
600603 platform_errata_cache [platform ] = {
601604 "cache" : [],
@@ -678,11 +681,9 @@ def main():
678681 repo_path ,
679682 )
680683
681- platform_regex = re .compile (r"\/(almalinux|vault)\/9\/" )
682684 platform_errata_cache = extract_errata_from_exported_paths (
683685 exporter = exporter ,
684686 exported_paths = exported_paths ,
685- platform_regex = platform_regex ,
686687 )
687688
688689 sync (
0 commit comments