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/0003-Don-t-use-buildroot-re...

73 lines
3.2 KiB

From dd594826f21a5b6b493ffd360745dc3b4af5c978 Mon Sep 17 00:00:00 2001
From: Tomas Kopecek <tkopecek@redhat.com>
Date: Thu, 9 May 2024 12:04:33 +0200
Subject: [PATCH 3/6] Don't use buildroot repo by default
---
plugins/builder/kiwi.py | 2 +-
plugins/cli/kiwi.py | 12 ++++++------
plugins/hub/kiwi.py | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/plugins/builder/kiwi.py b/plugins/builder/kiwi.py
index a878ad56..2ac5cb3b 100644
--- a/plugins/builder/kiwi.py
+++ b/plugins/builder/kiwi.py
@@ -351,7 +351,7 @@ class KiwiCreateImageTask(BaseBuildTask):
# user repos
repos = self.opts.get('repos', [])
- if self.opts.get('use_buildroot_repo', True):
+ if self.opts.get('use_buildroot_repo', False):
path_info = koji.PathInfo(topdir=self.options.topurl)
repopath = path_info.repo(repo_info['id'], target_info['build_tag_name'])
baseurl = '%s/%s' % (repopath, arch)
diff --git a/plugins/cli/kiwi.py b/plugins/cli/kiwi.py
index 6611df73..840e7539 100644
--- a/plugins/cli/kiwi.py
+++ b/plugins/cli/kiwi.py
@@ -34,10 +34,10 @@ def handle_kiwi_build(goptions, session, args):
parser.add_option("--result-bundle-name-format", help="Override default bundle name format")
parser.add_option("--make-prep", action="store_true", default=False,
help="Run 'make prep' in checkout before starting the build")
- parser.add_option("--no-buildroot-repo", action="store_false",
- dest="use_buildroot_repo", default=True,
- help="Don't add buildroot repo to installation sources, "
- "use only those provided by --repo option.")
+ parser.add_option("--buildroot-repo", action="store_false",
+ dest="use_buildroot_repo", default=False,
+ help="Add buildroot repo to installation sources. This is off by default, "
+ "but uf there is no --repo used, it will be turned on automatically.")
parser.add_option("--can-fail", action="store", dest="optional_arches",
metavar="ARCH1,ARCH2,...", default="",
help="List of archs which are not blocking for build "
@@ -84,8 +84,8 @@ def handle_kiwi_build(goptions, session, args):
kwargs['arches'] = [canonArch(arch) for arch in options.arches]
if options.repo:
kwargs['repos'] = options.repo
- if not options.use_buildroot_repo:
- kwargs['use_buildroot_repo'] = False
+ if options.use_buildroot_repo or not options.repo:
+ kwargs['use_buildroot_repo'] = True
task_id = session.kiwiBuild(**kwargs)
diff --git a/plugins/hub/kiwi.py b/plugins/hub/kiwi.py
index cd03ab42..81852e52 100644
--- a/plugins/hub/kiwi.py
+++ b/plugins/hub/kiwi.py
@@ -62,8 +62,8 @@ def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile
opts['make_prep'] = True
if type:
opts['type'] = type
- if not use_buildroot_repo:
- opts['use_buildroot_repo'] = False
+ if use_buildroot_repo:
+ opts['use_buildroot_repo'] = True
if type_attr:
opts['type_attr'] = type_attr
if result_bundle_name_format:
--
2.46.0