]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
apk: Download packages before installing
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 26 Sep 2025 08:45:17 +0000 (10:45 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 26 Sep 2025 13:51:11 +0000 (15:51 +0200)
We do this for all other package managers, let's make apk consistent
and do it there as well.

mkosi/installer/apk.py

index d4ac560ec8730757e33a522d2cbcf55b19989be7..28776ff537fe784dcb1756823d283448e0239a7d 100644 (file)
@@ -61,11 +61,12 @@ class Apk(PackageManager):
         return [
             "apk",
             "--root", "/buildroot",
+            "--cache-packages",
             "--cache-dir", "/var/cache/apk",
+            "--cache-predownload",
             "--arch", context.config.distribution.architecture(context.config.architecture),
             "--no-interactive",
             "--preserve-env",
-            "--cache-packages",
             "--keys-dir", "/etc/apk/keys",
             "--repositories-file", "/etc/apk/repositories",
             *(["--allow-untrusted"] if not context.config.repository_key_check else []),