From 28a5400d481ab99a4869f1279ea773c68b2c61cf Mon Sep 17 00:00:00 2001 From: InsanePrawn Date: Mon, 27 Mar 2023 21:27:10 +0200 Subject: [PATCH] distro/distro: get_base_distro(): add unsiged=True to keep old default behaviour --- distro/distro.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/distro/distro.py b/distro/distro.py index 06f43aa..2c64b7a 100644 --- a/distro/distro.py +++ b/distro/distro.py @@ -140,7 +140,7 @@ def get_RepoInfo(arch: Arch, repo_config: AbstrRepoConfig, default_url: Optional ) -def get_base_distro(arch: Arch, scan: bool = False) -> RemoteDistro: +def get_base_distro(arch: Arch, scan: bool = False, unsigned: bool = True) -> RemoteDistro: base_distros = get_repo_config().base_distros if base_distros is None or arch not in base_distros: base_distros = REPOS_CONFIG_DEFAULT.base_distros @@ -149,6 +149,8 @@ def get_base_distro(arch: Arch, scan: bool = False) -> RemoteDistro: distro = base_distros.get(arch) # type: ignore[assignment] repos = {} for repo, repo_config in distro.repos.items(): + if unsigned: + repo_config['options'] = (repo_config.get('options', None) or {}) | {'SigLevel': 'Never'} repos[repo] = get_RepoInfo(arch, repo_config, default_url=distro.remote_url) return RemoteDistro(arch=arch, repo_infos=repos, scan=scan)