forked from sig_core/toolkit
Support extra repos passed into lorax
This commit is contained in:
parent
48a4171ebd
commit
669686777c
@ -42,6 +42,7 @@ name={{ repo.name }}
|
|||||||
baseurl={{ repo.url }}
|
baseurl={{ repo.url }}
|
||||||
enabled=1
|
enabled=1
|
||||||
gpgcheck=0
|
gpgcheck=0
|
||||||
|
priority={{ repo.priority | default(100) }}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
@ -964,6 +964,7 @@ class Shared:
|
|||||||
compose_latest_sync,
|
compose_latest_sync,
|
||||||
compose_dir_is_here: bool = False,
|
compose_dir_is_here: bool = False,
|
||||||
hashed: bool = False,
|
hashed: bool = False,
|
||||||
|
extra_repos: list = None
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
Builds the repo dictionary
|
Builds the repo dictionary
|
||||||
@ -997,8 +998,26 @@ class Shared:
|
|||||||
|
|
||||||
repolist.append(repodata)
|
repolist.append(repodata)
|
||||||
|
|
||||||
|
if extra_repos:
|
||||||
|
repolist.append(repo for repo in Shared.parse_extra_repos(extra_repos))
|
||||||
|
|
||||||
return repolist
|
return repolist
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def parse_extra_repos(extra_repos: list) -> list:
|
||||||
|
# must be in format URL[,PRIORITY]
|
||||||
|
result = []
|
||||||
|
for idx, candidate in enumerate(extra_repos):
|
||||||
|
url, priority = candidate.split(',')
|
||||||
|
if not priority:
|
||||||
|
priority = 100
|
||||||
|
result.append({
|
||||||
|
'name': f"extra_repo_{idx}",
|
||||||
|
'url': url,
|
||||||
|
'priority': priority
|
||||||
|
})
|
||||||
|
return result
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def composeinfo_write(
|
def composeinfo_write(
|
||||||
compose_path,
|
compose_path,
|
||||||
|
Loading…
Reference in New Issue
Block a user