File: revert-copy-firmware.sh-remove-no-longer-reachable-test-f.patch

package info (click to toggle)
firmware-nonfree 20250917-1
  • links: PTS, VCS
  • area: non-free-firmware
  • in suites: sid
  • size: 1,364,704 kB
  • sloc: xml: 9,018; asm: 3,983; python: 3,898; sh: 488; ansic: 230; makefile: 163; perl: 17
file content (24 lines) | stat: -rw-r--r-- 981 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Ben Hutchings <benh@debian.org>
Date: Mon, 25 Nov 2024 22:02:01 +0100
Subject: Revert "copy-firmware.sh: remove no longer reachable test -f"
Fowarded: not-needed

This reverts commit 25d5e6352ba5dd8d8d75cb80fc905f65b13c4c44.  For any
files that we exclude, copy-firmware.sh will now create empty files
under debian/build/install.  Restore the check for missing files.

An alternative to this would be to patch the excluded files out of
WHENCE, but this would be a far larger patch that would probably
require more work to maintain.

---
--- a/copy-firmware.sh
+++ b/copy-firmware.sh
@@ -72,6 +72,7 @@ fi
 
 # shellcheck disable=SC2162 # file/folder name can include escaped symbols
 grep -E '^(RawFile|File):' WHENCE | sed -E -e 's/^(RawFile|File): */\1 /;s/"//g' | while read k f; do
+    test -f "$f" || continue
     install -d "$destdir/$(dirname "$f")"
     $verbose "copying/compressing file $f$compext"
     if test "$compress" != "cat" && test "$k" = "RawFile"; then