Revert "spdx: Update for bitbake changes"

This reverts part of commit 4859cdf97fd9a260036e148e25f0b78eb393df1e.

Modification of meta/classes/create-spdx-2.2.bbclass is not backported,
so no need to consider it.

In the commit, it updates spdx according to bitbake change. But the
bitbake commit

* 2515fbd10 fetch: Drop multiple branch/revision support for single git urls

doesn't backport for scarthgap.

So revert the other parts of the commit 4859cdf97fd9a260036e148e25f0b.

(From OE-Core rev: f3bfb98d1cf928678d9931308c116e9e6ec64ba5)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
Kai Kang
2025-11-24 21:55:06 +08:00
committed by Steve Sakoman
parent d71d81814a
commit 91ba7b5d66
2 changed files with 64 additions and 63 deletions

View File

@@ -356,6 +356,7 @@ def add_download_files(d, objset):
for download_idx, src_uri in enumerate(urls):
fd = fetch.ud[src_uri]
for name in fd.names:
file_name = os.path.basename(fetch.localpath(src_uri))
if oe.patch.patch_path(src_uri, fetch, "", expand=False):
primary_purpose = oe.spdx30.software_SoftwarePurpose.patch
@@ -405,7 +406,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.names[0]
fd, name
),
)
)

View File

@@ -239,6 +239,6 @@ def fetch_data_to_uri(fd, name):
uri = uri + "://" + fd.host + fd.path
if fd.method.supports_srcrev():
uri = uri + "@" + fd.revision
uri = uri + "@" + fd.revisions[name]
return uri