]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Reuse machine ID when re-using a cached image 942/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 30 Mar 2022 07:58:15 +0000 (09:58 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 30 Mar 2022 07:58:15 +0000 (09:58 +0200)
commitb71d1754d841c39a4093a648bf4e77e21c4dd585
tree7fa6b16052079a3e1e19e0879f6d88c05865a6f3
parent10509d7d9e8ab3fbb297a2e194f9c382052b9031
Reuse machine ID when re-using a cached image

4fb53aea9e04b931cccedf1545831e426d6ec2f7 broke incremental builds
for bootable Fedora images because when building the cached image,
the initrd is installed to "/efi/<machine-id>/...", and when doing
a cached build, a new machine ID is generated inside mkosi (but not
written to /etc/machine-id), making gen_kernel_images() unable to
find the initrd.

Let's fix the issue by re-using the machine ID from /etc/machine-id
when doing a cached build.

In the future, we can use the new entry-token feature of bootctl to
have kernel-install write to directory in /efi that's not tied to
the machine ID but until that's widely available this will have to
do.
mkosi/__init__.py