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
Signed-off-by: Joshua Watt <jpewhac...@gmail.com> --- meta/classes/create-spdx.bbclass | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/meta/classes/create-spdx.bbclass b/meta/classes/create-spdx.bbclass index 2638b3dc97..aa640977f9 100644 --- a/meta/classes/create-spdx.bbclass +++ b/meta/classes/create-spdx.bbclass @@ -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: -- 2.32.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#155574): https://lists.openembedded.org/g/openembedded-core/message/155574 Mute This Topic: https://lists.openembedded.org/mt/85302508/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-