linux-firmware.lore.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: linux-firmware@kernel.org
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>
Subject: [PATCH] copy-firmware: Always write Link: entries
Date: Mon, 28 Sep 2020 17:25:39 -0700	[thread overview]
Message-ID: <20200929002539.42024-1-anthony.l.nguyen@intel.com> (raw)

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>
---
 copy-firmware.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/copy-firmware.sh b/copy-firmware.sh
index eda16c357779..9b46b63913ab 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"
-- 
2.20.1


             reply	other threads:[~2020-09-29  0:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29  0:25 Tony Nguyen [this message]
2020-10-05 12:06 ` [PATCH] copy-firmware: Always write Link: entries Josh Boyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200929002539.42024-1-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=linux-firmware@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).