spdx30_tasks: fix FetchData attribute in add_download_files

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.

(From OE-Core rev: 17031d71cf4bc4fc19dd8a41c49b94e1f6a1edee)

Signed-off-by: Kamel Bouhara (Schneider Electric) <kamel.bouhara@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
Kamel Bouhara (Schneider Electric) 2025-11-07 14:14:36 +01:00 committed by Steve Sakoman
parent 11cd8498da
commit b16bf27386

View 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]
),
)
)