From: Daan De Meyer Date: Wed, 5 Mar 2025 19:11:58 +0000 (+0100) Subject: apt: Add higher priority for mkosi local repository X-Git-Tag: v26~328^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4e7a9fb7f20e2d1631db66ee9ed13bf4a78662b;p=thirdparty%2Fmkosi.git apt: Add higher priority for mkosi local repository Apt actually supports priorities as well, so add a high priority like we do for the other package managers as well for the local mkosi repository. --- diff --git a/mkosi/installer/apt.py b/mkosi/installer/apt.py index 2b9a4a33c..ec89a4d82 100644 --- a/mkosi/installer/apt.py +++ b/mkosi/installer/apt.py @@ -284,6 +284,17 @@ class Apt(PackageManager): ) ) + (context.sandbox_tree / "etc/apt/preferences.d").mkdir(parents=True, exist_ok=True) + (context.sandbox_tree / "etc/apt/preferences.d/mkosi-local.pref").write_text( + textwrap.dedent( + """\ + Package: * + Pin: origin mkosi + Pin-Priority: 1100 + """ + ) + ) + cls.invoke( context, "update",