From: Maxim Cournoyer Date: Tue, 4 Feb 2025 00:43:24 +0000 (+0900) Subject: copy-firmware: Fix 'No such file or directory' error. X-Git-Tag: 20250211~10^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51f770404afea4cfa5544fee4b6ffccf9dbd06cc;p=thirdparty%2Flinux-firmware.git copy-firmware: Fix 'No such file or directory' error. Attempting to clear the PARALLEL_ARGS_FILE variable when it was not set would cause the above error message. Clear it only when we know we are using it. This bug was only triggered when using the 'deb' target, as it invokes the copy-firmware.sh script without any '-j' argument, while the other install targets end up passing '-j1' when not using parallel compression. * copy-firmware.sh [NUM_JOBS > 1]: Only clear the content of PARALLEL_ARGS_FILE when this condition is met. Reported-by: Christophe Guillain Signed-off-by: Maxim Cournoyer --- diff --git a/copy-firmware.sh b/copy-firmware.sh index e64b5677..dd4b9b6f 100755 --- a/copy-firmware.sh +++ b/copy-firmware.sh @@ -111,9 +111,9 @@ grep -E '^(RawFile|File):' WHENCE | sed -E -e 's/^(RawFile|File): */\1 /;s/"//g' done if [ "$num_jobs" -gt 1 ]; then parallel -j"$num_jobs" -a "$parallel_args_file" + echo > "$parallel_args_file" # prepare for next run fi -echo > "$parallel_args_file" # shellcheck disable=SC2162 # file/folder name can include escaped symbols grep -E '^Link:' WHENCE | sed -e 's/^Link: *//g;s/-> //g' | while read l t; do directory="$destdir/$(dirname "$l")"