mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
boot: do not build test-hwids-section.c if ukify is disabled
Otherwise the build fails:
```
[22/3075] Generating src/boot/test-hwids-section.c with a custom command (wrapped by meson to capture output)
FAILED: src/boot/test-hwids-section.c
/usr/bin/meson --internal exe --capture src/boot/test-hwids-section.c -- /usr/bin/python3.10 /mnt/work/systemd/upstream-fork/main/src/boot/generate-hwids-section.py /mnt/work/systemd/upstream-fork/main/src/boot/hwids
--- stderr ---
Traceback (most recent call last):
File "/mnt/work/systemd/upstream-fork/main/src/boot/generate-hwids-section.py", line 12, in <module>
import ukify
File "/mnt/work/systemd/upstream-fork/main/src/boot/../ukify/ukify.py", line 61, in <module>
import pefile # type: ignore
ModuleNotFoundError: No module named 'pefile'
```
Follow-up for 640f8c3eb8
This commit is contained in:
parent
7f8c27758b
commit
5aab7ad075
@ -28,13 +28,17 @@ efi_fuzz_template = fuzz_template + efitest_base
|
||||
|
||||
generate_hwids_section_py = find_program('generate-hwids-section.py')
|
||||
|
||||
test_hwids_section_c = custom_target(
|
||||
'test-hwids-section.c',
|
||||
input : ['hwids/device1.json', 'hwids/device2.json', 'hwids/device2.json'],
|
||||
output : 'test-hwids-section.c',
|
||||
command : [generate_hwids_section_py, meson.current_source_dir()/'hwids'],
|
||||
capture : true,
|
||||
build_by_default : want_tests != 'false')
|
||||
if conf.get('ENABLE_UKIFY') == 1
|
||||
test_hwids_section_c = custom_target(
|
||||
'test-hwids-section.c',
|
||||
input : ['hwids/device1.json', 'hwids/device2.json', 'hwids/device2.json'],
|
||||
output : 'test-hwids-section.c',
|
||||
command : [generate_hwids_section_py, meson.current_source_dir()/'hwids'],
|
||||
capture : true,
|
||||
build_by_default : want_tests != 'false')
|
||||
else
|
||||
test_hwids_section_c = ''
|
||||
endif
|
||||
|
||||
executables += [
|
||||
efi_test_template + {
|
||||
@ -49,7 +53,7 @@ executables += [
|
||||
efi_test_template + {
|
||||
'sources' : files('test-chid-match.c') +
|
||||
test_hwids_section_c,
|
||||
'conditions' : ['ENABLE_BOOTLOADER'],
|
||||
'conditions' : ['ENABLE_BOOTLOADER', 'ENABLE_UKIFY'],
|
||||
},
|
||||
efi_fuzz_template + {
|
||||
'sources' : files('fuzz-bcd.c'),
|
||||
|
Loading…
Reference in New Issue
Block a user