|
|
|
@ -233,16 +233,9 @@ 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")
|
|
|
|
@ -251,9 +244,15 @@ def main():
|
|
|
|
|
kobo.log.add_stderr_logger(logger)
|
|
|
|
|
|
|
|
|
|
conf = util.load_config(opts.config)
|
|
|
|
|
|
|
|
|
|
compose_type = opts.compose_type or conf.get("compose_type", "production")
|
|
|
|
|
if compose_type == "production" and not opts.label and not opts.no_label:
|
|
|
|
|
label = opts.label or conf.get("label")
|
|
|
|
|
if label:
|
|
|
|
|
try:
|
|
|
|
|
productmd.composeinfo.verify_label(label)
|
|
|
|
|
except ValueError as ex:
|
|
|
|
|
abort(str(ex))
|
|
|
|
|
|
|
|
|
|
if compose_type == "production" and not label and not opts.no_label:
|
|
|
|
|
abort("must specify label for a production compose")
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
@ -300,7 +299,10 @@ def main():
|
|
|
|
|
|
|
|
|
|
if opts.target_dir:
|
|
|
|
|
compose_dir = Compose.get_compose_dir(
|
|
|
|
|
opts.target_dir, conf, compose_type=compose_type, compose_label=opts.label
|
|
|
|
|
opts.target_dir,
|
|
|
|
|
conf,
|
|
|
|
|
compose_type=compose_type,
|
|
|
|
|
compose_label=label
|
|
|
|
|
)
|
|
|
|
|
else:
|
|
|
|
|
compose_dir = opts.compose_dir
|
|
|
|
@ -309,7 +311,7 @@ def main():
|
|
|
|
|
ci = Compose.get_compose_info(
|
|
|
|
|
conf,
|
|
|
|
|
compose_type=compose_type,
|
|
|
|
|
compose_label=opts.label,
|
|
|
|
|
compose_label=label,
|
|
|
|
|
parent_compose_ids=opts.parent_compose_id,
|
|
|
|
|
respin_of=opts.respin_of,
|
|
|
|
|
)
|
|
|
|
|