Linux-Firmware Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] copy-firmware: Always write Link: entries
@ 2020-09-29  0:25 Tony Nguyen
  2020-10-05 12:06 ` Josh Boyer
  0 siblings, 1 reply; 2+ messages in thread
From: Tony Nguyen @ 2020-09-29  0:25 UTC (permalink / raw)
  To: linux-firmware; +Cc: Tony Nguyen

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] copy-firmware: Always write Link: entries
  2020-09-29  0:25 [PATCH] copy-firmware: Always write Link: entries Tony Nguyen
@ 2020-10-05 12:06 ` Josh Boyer
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Boyer @ 2020-10-05 12:06 UTC (permalink / raw)
  To: Tony Nguyen; +Cc: Linux Firmware

Applied and pushed out.

josh

On Mon, Sep 28, 2020 at 8:31 PM Tony Nguyen <anthony.l.nguyen@intel.com> wrote:
>
> 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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29  0:25 [PATCH] copy-firmware: Always write Link: entries Tony Nguyen
2020-10-05 12:06 ` Josh Boyer

Linux-Firmware Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-firmware/0 linux-firmware/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-firmware linux-firmware/ https://lore.kernel.org/linux-firmware \
		linux-firmware@kernel.org
	public-inbox-index linux-firmware

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.lore.linux-firmware


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git