aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Nguyen <anthony.l.nguyen@intel.com>2020-09-28 17:25:39 -0700
committerJosh Boyer <jwboyer@kernel.org>2020-10-05 08:06:02 -0400
commitc1bef9e01060f157f95496f0cbd4edb7b68a3dc8 (patch)
treefbcff3b35b79a341e0e3a434da436f752f3e439e
parentb95e23079a38543f899d03b974356f7d03859e59 (diff)
downloadlinux-firmware-c1bef9e01060f157f95496f0cbd4edb7b68a3dc8.tar.gz
copy-firmware: Always write Link: entries
File: entries in the WHENCE file overwrite existing files in the target directory, however, Link: entries are skipped if the file exists in the target directory. This can cause issues if the Link: entry is updated, but the target directory contains an old symlink. Do not skip writing Link: entries if the file exists, always create the symlink. This matches the behavior of File: entries and ensures symlinks will contain values from the WHENCE file. Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: Josh Boyer <jwboyer@kernel.org>
-rwxr-xr-xcopy-firmware.sh1
1 files changed, 0 insertions, 1 deletions
diff --git a/copy-firmware.sh b/copy-firmware.sh
index eda16c35..9b46b639 100755
--- a/copy-firmware.sh
+++ b/copy-firmware.sh
@@ -62,7 +62,6 @@ grep -E '^Link:' WHENCE | sed -e's/^Link: *//g' -e's/-> //g' | while read f d; d
$verbose "WARNING: missing target for symlink $f"
fi
else
- test -f "$destdir/$f" && continue
$verbose "creating link $f -> $d"
mkdir -p $destdir/$(dirname "$f")
ln -sf "$d" "$destdir/$f"