split-files: also handle conditional packages
This is a bit annoying, but meh. [skip changelog]
This commit is contained in:
parent
0e8fc18fbd
commit
453bbcb423
@ -1,6 +1,7 @@
|
|||||||
import re, sys, os, collections
|
import re, sys, os, collections
|
||||||
|
|
||||||
buildroot = sys.argv[1]
|
buildroot = sys.argv[1]
|
||||||
|
no_bootloader = '--no-bootloader' in sys.argv
|
||||||
|
|
||||||
known_files = '''
|
known_files = '''
|
||||||
%ghost %config(noreplace) /etc/crypttab
|
%ghost %config(noreplace) /etc/crypttab
|
||||||
@ -251,6 +252,8 @@ for file in files(buildroot):
|
|||||||
print(f'{prefix}{n}{suffix}', file=o)
|
print(f'{prefix}{n}{suffix}', file=o)
|
||||||
|
|
||||||
if [print(f'ERROR: no file names were written to {o.name}')
|
if [print(f'ERROR: no file names were written to {o.name}')
|
||||||
for o in outputs.values()
|
for name, o in outputs.items()
|
||||||
if o.tell() == 0]:
|
if (o.tell() == 0 and
|
||||||
|
not (no_bootloader and name in ('ukify', 'boot-unsigned')))
|
||||||
|
]:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -850,7 +850,7 @@ ln -s --relative %{buildroot}%{_bindir}/kernel-install %{buildroot}%{_sbindir}/i
|
|||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
|
|
||||||
# Split files in build root into rpms
|
# Split files in build root into rpms
|
||||||
python3 %{SOURCE2} %buildroot
|
python3 %{SOURCE2} %buildroot %{!?want_bootloader:--no-bootloader}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
|
Loading…
Reference in New Issue
Block a user