diff mbox series

[2/6] spdx30_tasks: fix FetchData attribute in add_download_files

Message ID 20250905171154.182825-3-kamel.bouhara@bootlin.com
State New
Headers show
Series backport: SPDX 3.0 support to Scarthgap | expand

Commit Message

Kamel Bouhara Sept. 5, 2025, 5:11 p.m. UTC
From: "Kamel Bouhara (Schneider Electric)" <kamel.bouhara@bootlin.com>

The add_download_files() function incorrectly accessed fd.name, which
does not exist on FetchData objects.

Change to use fd.names[0] to correctly retrieve the first filename.

This fixes AttributeError during SPDX document generation.

Signed-off-by: Kamel Bouhara (Schneider Electric) <kamel.bouhara@bootlin.com>
---
 meta/lib/oe/spdx30_tasks.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py
index 52329760b6..f6e6e545dc 100644
--- a/meta/lib/oe/spdx30_tasks.py
+++ b/meta/lib/oe/spdx30_tasks.py
@@ -405,7 +405,7 @@  def add_download_files(d, objset):
                     name=file_name,
                     software_primaryPurpose=primary_purpose,
                     software_downloadLocation=oe.spdx_common.fetch_data_to_uri(
-                        fd, fd.name
+                        fd, fd.names[0]
                     ),
                 )
             )