From e891fe7b09e82dc3d9b06b5d81701cc974665cb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Tue, 14 Mar 2023 11:49:50 +0200 Subject: [PATCH] Pass parent id/respin id to CTS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the --target-dir option is used, the compose can be created in CTS, but the parent and respin information is not passed through. That leads to data missing later on. JIRA: RHELCMP-11411 Signed-off-by: Lubomír Sedlář (cherry picked from commit 0c3b6e22f9580c57d20bce9343422d0875fb39aa (centos_master)) --- pungi/compose.py | 10 +++++++++- pungi/scripts/pungi_koji.py | 11 ++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/pungi/compose.py b/pungi/compose.py index fa59d27a..ab1d4794 100644 --- a/pungi/compose.py +++ b/pungi/compose.py @@ -199,11 +199,19 @@ def get_compose_dir( compose_respin=None, compose_label=None, already_exists_callbacks=None, + parent_compose_ids=None, + respin_of=None, ): already_exists_callbacks = already_exists_callbacks or [] ci = get_compose_info( - conf, compose_type, compose_date, compose_respin, compose_label + conf, + compose_type, + compose_date, + compose_respin, + compose_label, + parent_compose_ids, + respin_of, ) cts_url = conf.get("cts_url", None) diff --git a/pungi/scripts/pungi_koji.py b/pungi/scripts/pungi_koji.py index 5848f0a1..718f3ecf 100644 --- a/pungi/scripts/pungi_koji.py +++ b/pungi/scripts/pungi_koji.py @@ -233,9 +233,16 @@ def main(): latest_link_status = opts.latest_link_status or None latest_link_components = opts.latest_link_components + import kobo.conf import kobo.log import productmd.composeinfo + if opts.label: + try: + productmd.composeinfo.verify_label(opts.label) + except ValueError as ex: + abort(str(ex)) + from pungi.compose import Compose logger = logging.getLogger("pungi") @@ -302,7 +309,9 @@ def main(): opts.target_dir, conf, compose_type=compose_type, - compose_label=label + compose_label=label, + parent_compose_ids=opts.parent_compose_id, + respin_of=opts.respin_of, ) else: compose_dir = opts.compose_dir