Pass parent id/respin id to CTS

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ář <lsedlar@redhat.com>

(cherry picked from commit 0c3b6e22f9 (centos_master))
This commit is contained in:
Lubomír Sedlář 2023-03-14 11:49:50 +02:00 committed by Stepan Oksanichenko
parent 4cd7d39914
commit e891fe7b09
Signed by: soksanichenko
GPG Key ID: AB9983172AB1E45B
2 changed files with 19 additions and 2 deletions

View File

@ -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)

View File

@ -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