distro: bugfixes: use get_kupfer_url() in the right place to resolve branch placeholder, default some values
This commit is contained in:
parent
f3c53e449b
commit
e7fbcb6fbe
2 changed files with 5 additions and 2 deletions
|
@ -135,7 +135,7 @@ def get_RepoInfo(arch: Arch, repo_config: AbstrRepoConfig, default_url: Optional
|
||||||
url = url.get(arch, default_url)
|
url = url.get(arch, default_url)
|
||||||
assert url
|
assert url
|
||||||
return RepoInfo(
|
return RepoInfo(
|
||||||
url_template=url,
|
url_template=get_kupfer_url(url),
|
||||||
options=repo_config.get('options', None) or {},
|
options=repo_config.get('options', None) or {},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ def get_kupfer_distro(
|
||||||
repo_config = get_repo_config()
|
repo_config = get_repo_config()
|
||||||
if location == DistroLocation.REMOTE:
|
if location == DistroLocation.REMOTE:
|
||||||
cache = _kupfer_https
|
cache = _kupfer_https
|
||||||
default_url = get_kupfer_url(repo_config.remote_url or KUPFER_HTTPS)
|
default_url = repo_config.remote_url or KUPFER_HTTPS
|
||||||
repos = {repo: get_RepoInfo(arch, conf, default_url) for repo, conf in repo_config.repos.items() if not conf.local_only}
|
repos = {repo: get_RepoInfo(arch, conf, default_url) for repo, conf in repo_config.repos.items() if not conf.local_only}
|
||||||
cls = RemoteDistro
|
cls = RemoteDistro
|
||||||
elif location in [DistroLocation.CHROOT, DistroLocation.LOCAL]:
|
elif location in [DistroLocation.CHROOT, DistroLocation.LOCAL]:
|
||||||
|
|
|
@ -135,6 +135,8 @@ BASE_DISTRO_DEFAULTS = {
|
||||||
}
|
}
|
||||||
|
|
||||||
REPOS_CONFIG_DEFAULT = ReposConfigFile({
|
REPOS_CONFIG_DEFAULT = ReposConfigFile({
|
||||||
|
'_path': None,
|
||||||
|
'_checksum': None,
|
||||||
REMOTEURL_KEY: KUPFER_HTTPS,
|
REMOTEURL_KEY: KUPFER_HTTPS,
|
||||||
REPOS_KEY: {
|
REPOS_KEY: {
|
||||||
'local': REPO_DEFAULTS | {LOCALONLY_KEY: True},
|
'local': REPO_DEFAULTS | {LOCALONLY_KEY: True},
|
||||||
|
@ -148,6 +150,7 @@ REPOS_CONFIG_DEFAULT = ReposConfigFile({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
_current_config = deepcopy(REPOS_CONFIG_DEFAULT)
|
||||||
|
|
||||||
def get_repo_config(
|
def get_repo_config(
|
||||||
initialize_pkgbuilds: bool = False,
|
initialize_pkgbuilds: bool = False,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue