From 3cf12f4f9a6c0a36335e9e47b7911c2d04a45b3a Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 5 Jul 2024 16:36:45 +0100 Subject: [PATCH] mkosi: use apt pinning for locally built debian/ubuntu packages 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) --- .../system/mkosi.conf.d/10-debian-ubuntu/mkosi-pinning.pref | 3 +++ mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi-pinning.pref 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 index 00000000000..5649b70a855 --- /dev/null +++ b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi-pinning.pref @@ -0,0 +1,3 @@ +Package: * +Pin: release l=mkosi +Pin-Priority: 1100 diff --git a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf index e498c998032..76d1fdc700a 100644 --- a/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf +++ b/mkosi.images/system/mkosi.conf.d/10-debian-ubuntu/mkosi.conf @@ -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