]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Implement RepositoryKeyCheck= for apt
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 19 Jan 2024 11:21:47 +0000 (12:21 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 19 Jan 2024 12:12:15 +0000 (13:12 +0100)
mkosi/installer/apt.py

index ebfb7a7a0c5c9196eb876b8c8a2243e1d6a2014b..44a7b509bfcfd5e01e70ddc6bb26d6f69938d967 100644 (file)
@@ -81,6 +81,13 @@ def apt_cmd(context: Context, command: str) -> list[PathString]:
         "-o", "pkgCacheGen::ForceEssential=,",
     ]
 
+    if not context.config.repository_key_check:
+        cmdline += [
+            "-o", "Acquire::AllowInsecureRepositories=true",
+            "-o", "Acquire::AllowDowngradeToInsecureRepositories=true",
+            "-o", "APT::Get::AllowUnauthenticated=true",
+        ]
+
     if not context.config.with_docs:
         cmdline += [
             "-o", "DPkg::Options::=--path-exclude=/usr/share/doc/*",