mirror of
https://git.yoctoproject.org/poky
synced 2026-04-22 15:32:14 +02:00
classes/create-spdx: Fix file:// in downloadLocation
file:// URIs should not be included as the downloadLocation. Instead, loop until a non-file:// URI is found, or set the location to NOASSERTION if none is found (From OE-Core rev: 19c61ec3986213b336d965d90b1329085e7d6179) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
beeb0f9e53
commit
de3b871786
@@ -362,9 +362,12 @@ python do_create_spdx() {
|
||||
recipe.versionInfo = d.getVar("PV")
|
||||
recipe.SPDXID = oe.sbom.get_recipe_spdxid(d)
|
||||
|
||||
src_uri = d.getVar('SRC_URI')
|
||||
if src_uri:
|
||||
recipe.downloadLocation = src_uri.split()[0]
|
||||
for s in d.getVar('SRC_URI').split():
|
||||
if not s.startswith("file://"):
|
||||
recipe.downloadLocation = s
|
||||
break
|
||||
else:
|
||||
recipe.downloadLocation = "NOASSERTION"
|
||||
|
||||
homepage = d.getVar("HOMEPAGE")
|
||||
if homepage:
|
||||
|
||||
Reference in New Issue
Block a user