From 9ff7206b372bd77b768c246e70c99ee69913dcd9 Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Nov 18 2020 10:20:33 +0000 Subject: Override variants_file so it points to file from fork. Signed-off-by: Jan Kaluza --- diff --git a/cccc/cli.py b/cccc/cli.py index 8e0b251..36fe3f8 100644 --- a/cccc/cli.py +++ b/cccc/cli.py @@ -133,6 +133,8 @@ def _merge_updated_config(conf, args, merged_dir, scratch_dir): p.set_tree_arches(args.tree_arches) if args.skip_phases: p.skip_phases(args.skip_phases) + # Override variants_file so it points to updated variants_files. + p.set_variants_file(conf["variants_file"]) # write the updated pungi config file with the file name expected by ODCS merged_pungi_config_file = os.path.join(merged_dir, conf["merged_repo_pungi_config"]) diff --git a/cccc/config.py b/cccc/config.py index c451271..cd532ba 100644 --- a/cccc/config.py +++ b/cccc/config.py @@ -23,6 +23,7 @@ _DefaultConfig = { "bugzilla_jsonrpc_url": "https://bugzilla.redhat.com/jsonrpc.cgi", "bugzilla_product": "", "bugzilla_api_key_file": "", + "variants_file": "variants.xml", } _RHELConfiguration = { diff --git a/cccc/pungi.py b/cccc/pungi.py index b79d8f9..b462318 100644 --- a/cccc/pungi.py +++ b/cccc/pungi.py @@ -163,3 +163,11 @@ class PungiConfig(object): if "skip_phases" not in self.conf: self.conf["skip_phases"] = [] self.conf["skip_phases"] = list(set(self.conf["skip_phases"]) | set(phases)) + + def set_variants_file(self, variants_file): + """ + Sets the `variants_file` configuration option. + + :return: None + """ + self.conf["variants_file"] = variants_file diff --git a/tests/test_config.py b/tests/test_config.py index 263c709..e7a0228 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -28,6 +28,7 @@ DEFAULT_DEFAULTS = { "bugzilla_jsonrpc_url": "https://bugzilla.redhat.com/jsonrpc.cgi", "bugzilla_product": "", "bugzilla_api_key_file": "", + "variants_file": "variants.xml" }