mkosi: use apt pinning for locally built debian/ubuntu packages
authorLuca Boccassi <bluca@debian.org>
Fri, 5 Jul 2024 15:36:45 +0000 (16:36 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 9 Jul 2024 13:18:38 +0000 (15:18 +0200)
This ensures that even in case the distro repository has newer
versions, the locally built packages are preferred and installed,
even to the point of downgrading already installed ones.
This is needed especially for future stable branches, when the
distros will have a newer version.

(cherry picked from commit 1ee8e526d77cf8eb8ad39622848d87891b7ac13a)

mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi-pinning.pref [new file with mode: 0644]
mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf

diff --git a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi-pinning.pref b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi-pinning.pref
new file mode 100644 (file)
index 0000000..5649b70
--- /dev/null
@@ -0,0 +1,3 @@
+Package: *
+Pin: release l=mkosi
+Pin-Priority: 1100
index e498c998032c9ea40999f8edd2b7dde53cf98573..76d1fdc700a7d4f9a16a8a707545731771963272 100644 (file)
@@ -11,6 +11,9 @@ Environment=
         GIT_BRANCH=ci/v256-stable
         GIT_COMMIT=5f07b24c429e854db1afad5f14729804a46a59af
 
+[Distribution]
+PackageManagerTrees=mkosi-pinning.pref:/etc/apt/preferences.d/mkosi-pinning.pref
+
 VolatilePackages=
         libnss-myhostname
         libnss-mymachines