From: Alyssa Ross Date: Wed, 6 May 2026 13:31:59 +0000 (+0200) Subject: meson: improve precision of pefile checks X-Git-Tag: v261-rc1~170^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=106bb47d2d193e546821da593d1c446ea53414c3;p=thirdparty%2Fsystemd.git meson: improve precision of pefile checks Previously, if boot was enabled but ukify wasn't, the check for the pefile Python module would be omitted. The check in want_ukify was incorrect — with Meson it's only possible to check for Python dependencies available for the build Python. When the build Python is not the same as the Python that will be used to run the installed ukify, this would incorrectly require ukify to be available to the build Python. The most common, but not the only case where this would happen would be when cross compiling. If bootloader and tests are disabled, there's no need for the build Python to have pefile even when installing ukify. Therefore, check in the more specific case of ukify's tests being enabled, in which case pefile is required at build time. --- diff --git a/meson.build b/meson.build index d6fbd7c2b7e..59bfde7f0cb 100644 --- a/meson.build +++ b/meson.build @@ -1686,7 +1686,7 @@ if have and efi_arch == 'x64' and cc.links(''' efi_cpu_family_alt = 'x86' endif -want_ukify = pymod.find_installation('python3', required: get_option('ukify'), modules : ['pefile']).found() +want_ukify = get_option('ukify').allowed() conf.set10('ENABLE_UKIFY', want_ukify) #####################################################################