From 9a1b9dd154f9648e7e2abca9c00edfc79c7974af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Mon, 27 Apr 2020 15:47:49 +0200 Subject: [PATCH] Fix warning about productimg in skip_phases option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If phase is skipped in a config option (and not on command line), we should just print a warning or do nothing in quiet mode. JIRA: RHELCMP-399 Signed-off-by: Lubomír Sedlář --- pungi/checks.py | 2 +- pungi/scripts/pungi_koji.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pungi/checks.py b/pungi/checks.py index a77bfdd6..3821ddbb 100644 --- a/pungi/checks.py +++ b/pungi/checks.py @@ -780,7 +780,7 @@ def make_schema(): "paths_module": {"type": "string"}, "skip_phases": { "type": "array", - "items": {"type": "string", "enum": PHASES_NAMES}, + "items": {"type": "string", "enum": PHASES_NAMES + ["productimg"]}, "default": [], }, "image_name_format": { diff --git a/pungi/scripts/pungi_koji.py b/pungi/scripts/pungi_koji.py index 7dfdd6b6..253b2c49 100644 --- a/pungi/scripts/pungi_koji.py +++ b/pungi/scripts/pungi_koji.py @@ -249,7 +249,7 @@ def main(): if not opts.quiet: # TODO: workaround for config files containing skip_phase = productimg # Remove when all config files are up to date - if "productimg" in opts.skip_phase or "productimg" in opts.just_phase: + if "productimg" in opts.skip_phase + opts.just_phase + conf["skip_phases"]: print( "WARNING: productimg phase has been removed, please remove it from " "--skip-phase or --just-phase option",