diff --git a/distro/distro.py b/distro/distro.py index 313bd55..5f820b6 100644 --- a/distro/distro.py +++ b/distro/distro.py @@ -135,7 +135,7 @@ def get_RepoInfo(arch: Arch, repo_config: AbstrRepoConfig, default_url: Optional url = url.get(arch, default_url) assert url return RepoInfo( - url_template=url, + url_template=get_kupfer_url(url), options=repo_config.get('options', None) or {}, ) @@ -165,7 +165,7 @@ def get_kupfer_distro( repo_config = get_repo_config() if location == DistroLocation.REMOTE: 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} cls = RemoteDistro elif location in [DistroLocation.CHROOT, DistroLocation.LOCAL]: diff --git a/distro/repo_config.py b/distro/repo_config.py index 366a533..d0d85c3 100644 --- a/distro/repo_config.py +++ b/distro/repo_config.py @@ -135,6 +135,8 @@ BASE_DISTRO_DEFAULTS = { } REPOS_CONFIG_DEFAULT = ReposConfigFile({ + '_path': None, + '_checksum': None, REMOTEURL_KEY: KUPFER_HTTPS, REPOS_KEY: { 'local': REPO_DEFAULTS | {LOCALONLY_KEY: True}, @@ -148,6 +150,7 @@ REPOS_CONFIG_DEFAULT = ReposConfigFile({ }, }) +_current_config = deepcopy(REPOS_CONFIG_DEFAULT) def get_repo_config( initialize_pkgbuilds: bool = False,