diff mbox series

[RFC,02/30] lib: spdx30_tasks: use expanded FetchData for download files

Message ID 20250211150034.18696-3-stefan.herbrechtsmeier-oss@weidmueller.com
State New
Headers show
Series Add vendor support for go, npm and rust | expand

Commit Message

Stefan Herbrechtsmeier Feb. 11, 2025, 3 p.m. UTC
From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>

Use the expanded list of FetchData objects covering both the given
SRC_URLs and any additional implicit URLs that are added automatically
by the appropriate FetchMethod.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
---

 meta/lib/oe/spdx30_tasks.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py
index 6a39246fe1..10b1b3fe14 100644
--- a/meta/lib/oe/spdx30_tasks.py
+++ b/meta/lib/oe/spdx30_tasks.py
@@ -343,9 +343,8 @@  def add_download_files(d, objset):
     urls = d.getVar("SRC_URI").split()
     fetch = bb.fetch2.Fetch(urls, d)
 
-    for download_idx, src_uri in enumerate(urls):
-        fd = fetch.ud[src_uri]
-
+    for download_idx, fd in enumerate(fetch.expanded_urldata()):
+        src_uri = fd.url
         for name in fd.names:
             file_name = os.path.basename(fetch.localpath(src_uri))
             if oe.patch.patch_path(src_uri, fetch, "", expand=False):