mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
spdx 3.0: Map gitsm URI to git
"gitsm" is not a recognized URI protocol (outside of bitbake), so map it to "git" when writing. This should be OK since we report all of the submodule source code (if enabled), and it's still possible for 3rd party analyzers to determine that submodules are in use by looking at .gitmodules. The code to do the mapping is moved to a common location so it covers SPDX 2.2 also [YOCTO #15582] (From OE-Core rev: 6ecf89c75b1a74515266085acc5d3621a0fb2fa1) 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
98e71107d7
commit
07836a9684
@@ -354,15 +354,6 @@ def add_download_packages(d, doc, recipe):
|
||||
if f.type == "file":
|
||||
continue
|
||||
|
||||
uri = f.type
|
||||
proto = getattr(f, "proto", None)
|
||||
if proto is not None:
|
||||
uri = uri + "+" + proto
|
||||
uri = uri + "://" + f.host + f.path
|
||||
|
||||
if f.method.supports_srcrev():
|
||||
uri = uri + "@" + f.revisions[name]
|
||||
|
||||
if f.method.supports_checksum(f):
|
||||
for checksum_id in CHECKSUM_LIST:
|
||||
if checksum_id.upper() not in oe.spdx.SPDXPackage.ALLOWED_CHECKSUMS:
|
||||
@@ -377,7 +368,7 @@ def add_download_packages(d, doc, recipe):
|
||||
c.checksumValue = expected_checksum
|
||||
package.checksums.append(c)
|
||||
|
||||
package.downloadLocation = uri
|
||||
package.downloadLocation = oe.spdx_common.fetch_data_to_uri(f, name)
|
||||
doc.packages.append(package)
|
||||
doc.add_relationship(doc, "DESCRIBES", package)
|
||||
# In the future, we might be able to do more fancy dependencies,
|
||||
|
||||
Reference in New Issue
Block a user