]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
spdx30_tasks: fix FetchData attribute in add_download_files
authorKamel Bouhara (Schneider Electric) <kamel.bouhara@bootlin.com>
Fri, 7 Nov 2025 13:14:36 +0000 (14:14 +0100)
committerSteve Sakoman <steve@sakoman.com>
Mon, 10 Nov 2025 15:03:45 +0000 (07:03 -0800)
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

index 52329760b6a90e4b25486002ba4fcea2e75e42d6..f6e6e545dc45d9a22bc634c583a209995b2592a9 100644 (file)
@@ -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]
                     ),
                 )
             )