You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
koji/0005-improve-warnings-for-o...

39 lines
1.4 KiB

From 0e43634af51842f92da3911899d0d10f4b544a51 Mon Sep 17 00:00:00 2001
From: Tomas Kopecek <tkopecek@redhat.com>
Date: Wed, 15 May 2024 09:26:36 +0200
Subject: [PATCH 5/6] improve warnings for older hub
---
plugins/cli/kiwi.py | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/plugins/cli/kiwi.py b/plugins/cli/kiwi.py
index 8f8addaf..02958373 100644
--- a/plugins/cli/kiwi.py
+++ b/plugins/cli/kiwi.py
@@ -85,15 +85,14 @@ def handle_kiwi_build(goptions, session, args):
kwargs['arches'] = [canonArch(arch) for arch in options.arches]
if options.repo:
kwargs['repos'] = options.repo
- if options.use_buildroot_repo or not options.repo:
- if not options.repo:
- warn("no repos given, using buildroot repo")
- if session.hub_version >= (1, 35, 0):
- # for older plugin versions it is the default behaviour
- # and option doesn't exist
- kwargs['use_buildroot_repo'] = True
+
if session.hub_version < (1, 35, 0):
warn("hub version is < 1.35, buildroot repo is always used in addition to specified repos")
+ elif options.use_buildroot_repo:
+ kwargs['use_buildroot_repo'] = True
+ elif not options.repo:
+ warn("no repos given, using buildroot repo")
+ kwargs['use_buildroot_repo'] = True
task_id = session.kiwiBuild(**kwargs)
--
2.46.0