From f7925da6cd9f02fe5bb590205e26028c28d8ee23 Mon Sep 17 00:00:00 2001 From: Cyril Brulebois Date: Sat, 21 Jan 2023 18:54:38 +0100 Subject: [PATCH] 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. --- tools/make_disc_trees.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/make_disc_trees.pl b/tools/make_disc_trees.pl index 6ffeb11c..8716b5db 100755 --- a/tools/make_disc_trees.pl +++ b/tools/make_disc_trees.pl @@ -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