From 7cfd0faf1d791065584574ec1aed07381558d3c4 Mon Sep 17 00:00:00 2001 From: Lingyan Zhuang Date: Feb 01 2023 06:03:21 +0000 Subject: Reorder repos in repo file Move BaseOS to the beginning. JIRA: RHELCMP-9491 --- diff --git a/compose_utils/repo_file.py b/compose_utils/repo_file.py index 28d4fbe..0df5343 100644 --- a/compose_utils/repo_file.py +++ b/compose_utils/repo_file.py @@ -97,7 +97,10 @@ def run(opts, output): compose = productmd.Compose(path) def by_uid(variant): - return variant.uid + if variant.uid == "BaseOS": + return "" + else: + return variant.uid for variant in sorted(compose.info.variants.variants.values(), key=by_uid): if opts.variant and variant.uid not in opts.variant: