[elbe-devel] [PATCH v2 1/4] virtapt: introduce noauth parameter
Volker Haspel
volker.haspel at linutronix.de
Wed Aug 15 12:07:07 CEST 2018
On Mon, 13 Aug 2018 09:51:02 +0200
Manuel Traut <manut at linutronix.de> wrote:
> noauth is used in the elbe context to be able to use unsigned
> repositories. the allowinsecurerepositories option is also set, to be
> able to use repos that are signed with an unknown key.
>
> defaults to false, to have the same behaviour than without the patch.
>
> Signed-off-by: Manuel Traut <manut at linutronix.de>
Reviewed-by: Volker Haspel <volker.haspel at linutronix.de>
> ---
> elbepack/virtapt.py | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/elbepack/virtapt.py b/elbepack/virtapt.py
> index fd3149ba..7f03d767 100644
> --- a/elbepack/virtapt.py
> +++ b/elbepack/virtapt.py
> @@ -56,7 +56,7 @@ def lookup_uri(v, d, target_pkg):
>
>
> class VirtApt:
> - def __init__(self, arch, suite, sources, prefs, keylist=[]):
> + def __init__(self, arch, suite, sources, prefs, keylist=[],
> noauth=False):
> self.projectpath = mkdtemp()
> self.initialize_dirs()
> @@ -80,7 +80,12 @@ class VirtApt:
> apt_pkg.config.set("Dir::Cache", "cache")
> apt_pkg.config.set("Dir::Etc", "etc/apt")
> apt_pkg.config.set("Dir::Log", "log")
> - apt_pkg.config.set("APT::Get::AllowUnauthenticated", "0")
> + if noauth:
> + apt_pkg.config.set("APT::Get::AllowUnauthenticated", "1")
> + apt_pkg.config.set("Acquire::AllowInsecureRepositories",
> "1")
> + else:
> + apt_pkg.config.set("APT::Get::AllowUnauthenticated", "0")
> + apt_pkg.config.set("Acquire::AllowInsecureRepositories",
> "0")
> apt_pkg.init_system()
>
More information about the elbe-devel
mailing list