linux-firmware.lore.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] check_whence: Add a check for duplicate link entries
@ 2024-02-02 14:41 Juerg Haefliger
  2024-02-19 12:51 ` Josh Boyer
  0 siblings, 1 reply; 2+ messages in thread
From: Juerg Haefliger @ 2024-02-02 14:41 UTC (permalink / raw)
  To: linux-firmware; +Cc: jwboyer

Verify that there a no duplicate 'Link:' entries in the WHENCE file.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
---
 check_whence.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/check_whence.py b/check_whence.py
index 4b5471e04a6f..fd74a56a5c5a 100755
--- a/check_whence.py
+++ b/check_whence.py
@@ -70,6 +70,7 @@ def main():
     whence_list = list(list_whence())
     whence_files = list(list_whence_files())
     links_list = list(list_links_list())
+    whence_links = list(zip(*links_list))[0]
     known_files = set(name for name in whence_list if not name.endswith("/")) | set(
         [
             ".gitignore",
@@ -102,6 +103,10 @@ def main():
         sys.stderr.write("E: %s listed in WHENCE twice\n" % name)
         ret = 1
 
+    for name in set(link for link in whence_links if whence_links.count(link) > 1):
+        sys.stderr.write("E: %s listed in WHENCE twice\n" % name)
+        ret = 1
+
     for name in set(link for link in whence_files if os.path.islink(link)):
         sys.stderr.write("E: %s listed in WHENCE as File, but is a symlink\n" % name)
         ret = 1
-- 
2.40.1


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

* Re: [PATCH] check_whence: Add a check for duplicate link entries
  2024-02-02 14:41 [PATCH] check_whence: Add a check for duplicate link entries Juerg Haefliger
@ 2024-02-19 12:51 ` Josh Boyer
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Boyer @ 2024-02-19 12:51 UTC (permalink / raw)
  To: Juerg Haefliger; +Cc: linux-firmware, jwboyer

On Fri, Feb 2, 2024 at 9:41 AM Juerg Haefliger
<juerg.haefliger@canonical.com> wrote:
>
> Verify that there a no duplicate 'Link:' entries in the WHENCE file.
>
> Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>

Applied and pushed out.

https://gitlab.com/kernel-firmware/linux-firmware/-/merge_requests/146

josh

> ---
>  check_whence.py | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/check_whence.py b/check_whence.py
> index 4b5471e04a6f..fd74a56a5c5a 100755
> --- a/check_whence.py
> +++ b/check_whence.py
> @@ -70,6 +70,7 @@ def main():
>      whence_list = list(list_whence())
>      whence_files = list(list_whence_files())
>      links_list = list(list_links_list())
> +    whence_links = list(zip(*links_list))[0]
>      known_files = set(name for name in whence_list if not name.endswith("/")) | set(
>          [
>              ".gitignore",
> @@ -102,6 +103,10 @@ def main():
>          sys.stderr.write("E: %s listed in WHENCE twice\n" % name)
>          ret = 1
>
> +    for name in set(link for link in whence_links if whence_links.count(link) > 1):
> +        sys.stderr.write("E: %s listed in WHENCE twice\n" % name)
> +        ret = 1
> +
>      for name in set(link for link in whence_files if os.path.islink(link)):
>          sys.stderr.write("E: %s listed in WHENCE as File, but is a symlink\n" % name)
>          ret = 1
> --
> 2.40.1
>

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

end of thread, other threads:[~2024-02-19 12:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-02 14:41 [PATCH] check_whence: Add a check for duplicate link entries Juerg Haefliger
2024-02-19 12:51 ` Josh Boyer

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).