From 9f26a727e0d1f3babff22c03c55e0e5ce613cd01 Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Nov 12 2020 11:06:20 +0000 Subject: Fix limiting the arches and phases. --- diff --git a/cccc/__main__.py b/cccc/__main__.py index dc8f69d..e589ec8 100644 --- a/cccc/__main__.py +++ b/cccc/__main__.py @@ -74,7 +74,8 @@ def main(argv=None): "ODCS compose configuration arguments") odcs_compose_group.add_argument( "--tree-arch", - type=list, + type=str, + action="append", default=[], required=False, help="Architecture(s) the ODCS compose is built for.", @@ -82,7 +83,8 @@ def main(argv=None): ) odcs_compose_group.add_argument( "--skip-phase", - type=list, + type=str, + action="append", default=[], required=False, help="Pungi phase(s) skipped in the ODCS compose.", diff --git a/cccc/cli.py b/cccc/cli.py index 34aa321..eb7823d 100644 --- a/cccc/cli.py +++ b/cccc/cli.py @@ -85,6 +85,12 @@ def _copy_default_config(conf, args, merged_dir, scratch_dir): merged_pungi_config_file = os.path.join(merged_dir, conf["merged_repo_pungi_config"]) p.config_file_write(merged_pungi_config_file) + # Also limit tree_arches and phases for default config. + if args.tree_arches: + p.set_tree_arches(args.tree_arches) + if args.skip_phases: + p.skip_phases(args.skip_phases) + commit = cccc.git.commit_all(merged_dir, "Default configuration") return commit