kiwi: Only add buildroot repo if user repositories are not defined

In general, we assume that if the user is specifying repositories,
the built-in one should not be used.
This commit is contained in:
Neal Gompa 2024-03-20 12:45:17 -04:00 committed by Tomas Kopecek
parent faf3d937f4
commit 694ac41483

View file

@ -351,12 +351,13 @@ class KiwiCreateImageTask(BaseBuildTask):
# user repos
repos = self.opts.get('repos', [])
# buildroot repo
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)
self.logger.debug('BASEURL: %s' % baseurl)
repos.append(baseurl)
# buildroot repo if user repos not defined
if repos == []:
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)
self.logger.debug('BASEURL: %s' % baseurl)
repos.append(baseurl)
base_path = os.path.dirname(desc_path)
if opts.get('make_prep'):