make_disc_trees.pl: store .component alongside .patterns for firmware packages

This makes it possible for hw-detect's install-firmware hook to enable the
right components if it installs firmware packages based on modalias
information. The components found in Contents-firmware indices are only
useful for firmware packages detected by the check-missing-firmware.sh
script.
This commit is contained in:
Cyril Brulebois 2023-01-21 18:54:38 +01:00
parent 4308e4666c
commit f7925da6cd
1 changed files with 5 additions and 0 deletions

View File

@ -1230,6 +1230,11 @@ sub add_firmware_stuff {
system(@args) == 0 or die "generate_firmware_patterns failed: $?";
if (-f "$dir/firmware/dep11/$p.patterns") {
$blocks_added += get_file_blocks("$dir/firmware/dep11/$p.patterns");
# Make sure apt-setup can be configured appropriately:
open(CFILE, ">$dir/firmware/dep11/$p.component");
print CFILE $component;
close CFILE;
$blocks_added += get_file_blocks("$dir/firmware/dep11/$p.component");
}
# Find the current size of the firmware Contents file