From f1df66449ce3ca3062ff74a1d93d6a9e478d57f7 Mon Sep 17 00:00:00 2001 From: Matej Matuska Date: Thu, 16 Mar 2023 12:23:33 +0100 Subject: [PATCH] CLI: Use new Leapp output APIs - reports summary better The new Leapp output APIs now display better summary about the report. See https://github.com/oamg/leapp/pull/818 for more info. * Require leapp-framework versio 4.0 * Suppress redundant-keyword-arg for pylint pstodulk: we have one error or another and this one is not actually so important from my POV - I would even argue that it's not a bad habit --- .pylintrc | 1 + commands/preupgrade/__init__.py | 3 ++- commands/upgrade/__init__.py | 2 +- packaging/leapp-repository.spec | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.pylintrc b/.pylintrc index 7ddb58d668..2ef31167d0 100644 --- a/.pylintrc +++ b/.pylintrc @@ -7,6 +7,7 @@ disable= no-member, no-name-in-module, raising-bad-type, + redundant-keyword-arg, # it's one or the other, this one is not so bad at all # "W" Warnings for stylistic problems or minor programming issues no-absolute-import, arguments-differ, diff --git a/commands/preupgrade/__init__.py b/commands/preupgrade/__init__.py index 614944ccd7..15a9311064 100644 --- a/commands/preupgrade/__init__.py +++ b/commands/preupgrade/__init__.py @@ -80,7 +80,8 @@ def preupgrade(args, breadcrumbs): report_inhibitors(context) report_files = util.get_cfg_files('report', cfg) log_files = util.get_cfg_files('logs', cfg) - report_info(report_files, log_files, answerfile_path, fail=workflow.failure) + report_info(context, report_files, log_files, answerfile_path, fail=workflow.failure) + if workflow.failure: sys.exit(1) diff --git a/commands/upgrade/__init__.py b/commands/upgrade/__init__.py index b59bf79f13..aa327c3ba5 100644 --- a/commands/upgrade/__init__.py +++ b/commands/upgrade/__init__.py @@ -110,7 +110,7 @@ def upgrade(args, breadcrumbs): util.generate_report_files(context, report_schema) report_files = util.get_cfg_files('report', cfg) log_files = util.get_cfg_files('logs', cfg) - report_info(report_files, log_files, answerfile_path, fail=workflow.failure) + report_info(context, report_files, log_files, answerfile_path, fail=workflow.failure) if workflow.failure: sys.exit(1) diff --git a/packaging/leapp-repository.spec b/packaging/leapp-repository.spec index 2d0d6fd899..0fce25df8d 100644 --- a/packaging/leapp-repository.spec +++ b/packaging/leapp-repository.spec @@ -100,7 +100,7 @@ Requires: leapp-repository-dependencies = %{leapp_repo_deps} # IMPORTANT: this is capability provided by the leapp framework rpm. # Check that 'version' instead of the real framework rpm version. -Requires: leapp-framework >= 3.1, leapp-framework < 4 +Requires: leapp-framework >= 4.0, leapp-framework < 5 # Since we provide sub-commands for the leapp utility, we expect the leapp # tool to be installed as well.