]> granicus.if.org Git - linux-firmware/commitdiff
copy-firmware: Always write Link: entries
authorTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 29 Sep 2020 00:25:39 +0000 (17:25 -0700)
committerJosh Boyer <jwboyer@kernel.org>
Mon, 5 Oct 2020 12:06:02 +0000 (08:06 -0400)
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>
copy-firmware.sh

index eda16c357779165a71a7c1de3b0f9fd736231d88..9b46b63913ab546ed545f8665e03d1b9b8f4252d 100755 (executable)
@@ -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"