kiwibuild: Remove repos as dicts
The task needs just URLs, the dics don't bring anything here.
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
(cherry picked from commit c80ebb029b
)
This commit is contained in:
parent
c17b820490
commit
ab1960de6d
@ -36,23 +36,10 @@ class KiwiBuildPhase(
|
|||||||
resolved_repos = []
|
resolved_repos = []
|
||||||
|
|
||||||
for repo in repos:
|
for repo in repos:
|
||||||
if isinstance(repo, dict):
|
repo = util.get_repo_url(compose, repo, arch=arch)
|
||||||
try:
|
if repo is None:
|
||||||
url = repo["baseurl"]
|
raise RuntimeError("Failed to resolve repo URL for %s" % repo)
|
||||||
except KeyError:
|
resolved_repos.append(repo)
|
||||||
raise RuntimeError(
|
|
||||||
"`baseurl` is required in repo dict %s" % str(repo)
|
|
||||||
)
|
|
||||||
url = util.get_repo_url(compose, url, arch=arch)
|
|
||||||
if url is None:
|
|
||||||
raise RuntimeError("Failed to resolve repo URL for %s" % str(repo))
|
|
||||||
repo["baseurl"] = url
|
|
||||||
resolved_repos.append(repo)
|
|
||||||
else:
|
|
||||||
repo = util.get_repo_url(compose, repo, arch=arch)
|
|
||||||
if repo is None:
|
|
||||||
raise RuntimeError("Failed to resolve repo URL for %s" % repo)
|
|
||||||
resolved_repos.append(repo)
|
|
||||||
|
|
||||||
return resolved_repos
|
return resolved_repos
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user