split-files: also handle conditional packages

This is a bit annoying, but meh.

[skip changelog]
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2023-11-23 15:10:10 +01:00
parent 0e8fc18fbd
commit 453bbcb423
2 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,7 @@
import re, sys, os, collections
buildroot = sys.argv[1]
no_bootloader = '--no-bootloader' in sys.argv
known_files = '''
%ghost %config(noreplace) /etc/crypttab
@ -251,6 +252,8 @@ for file in files(buildroot):
print(f'{prefix}{n}{suffix}', file=o)
if [print(f'ERROR: no file names were written to {o.name}')
for o in outputs.values()
if o.tell() == 0]:
for name, o in outputs.items()
if (o.tell() == 0 and
not (no_bootloader and name in ('ukify', 'boot-unsigned')))
]:
sys.exit(1)

View File

@ -850,7 +850,7 @@ ln -s --relative %{buildroot}%{_bindir}/kernel-install %{buildroot}%{_sbindir}/i
%find_lang %{name}
# Split files in build root into rpms
python3 %{SOURCE2} %buildroot
python3 %{SOURCE2} %buildroot %{!?want_bootloader:--no-bootloader}
%check
%if %{with tests}