diff mbox series

[1/3] meta/lib/oe/sbom30.py: correct alias

Message ID 20241211120728.3737604-1-hongxu.jia@windriver.com
State New
Headers show
Series [1/3] meta/lib/oe/sbom30.py: correct alias | expand

Commit Message

Hongxu Jia Dec. 11, 2024, 12:07 p.m. UTC
After commit [spdx 3.0: Rework how SPDX aliases are linked] applied,
it added extra "/" to namespace, which causing the replacement of
UNIHASH missing a "/"

  http://spdxdocs.org/openembedded-alias/by-doc-hash/0b308e4b9ad979f642d8787c61f76c31bdcad04837eeaaf8bc383f33f99bbeb8/flex-nativeUNIHASH/build/recipe

After applying this commit to remove "/" from namespace.

  http://spdxdocs.org/openembedded-alias/by-doc-hash/0b308e4b9ad979f642d8787c61f76c31bdcad04837eeaaf8bc383f33f99bbeb8/flex-native/UNIHASH/build/recipe

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/lib/oe/sbom30.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mathieu Dubois-Briand Dec. 11, 2024, 5:03 p.m. UTC | #1
On Wed Dec 11, 2024 at 1:07 PM CET, hongxu via lists.openembedded.org wrote:
> After commit [spdx 3.0: Rework how SPDX aliases are linked] applied,
> it added extra "/" to namespace, which causing the replacement of
> UNIHASH missing a "/"
>
>   http://spdxdocs.org/openembedded-alias/by-doc-hash/0b308e4b9ad979f642d8787c61f76c31bdcad04837eeaaf8bc383f33f99bbeb8/flex-nativeUNIHASH/build/recipe
>
> After applying this commit to remove "/" from namespace.
>
>   http://spdxdocs.org/openembedded-alias/by-doc-hash/0b308e4b9ad979f642d8787c61f76c31bdcad04837eeaaf8bc383f33f99bbeb8/flex-native/UNIHASH/build/recipe
>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---

Hi Hongxu,

We have some warnings on the autobuilder while picking these patches,
such as:

WARNING: core-image-sato-1.0-r0 do_create_image_sbom_spdx: The following SPDX IDs were unable to be resolved:
  http://spdxdocs.org/openembedded-alias/by-doc-hash/7f7bda815cc04b5b265ac8602753d177a96016826f71217624323d1afbb6a65e/gdk-pixbuf/UNIHASH/build/recipe
  http://spdxdocs.org/openembedded-alias/by-doc-hash/c0aa4c9cb1de03839f2a5e077627543f00e6269d6a16bfccf156b395df054f2d/gtk+3/UNIHASH/build/recipe

https://valkyrie.yoctoproject.org/#/builders/13/builds/557/steps/13/logs/stdio
https://valkyrie.yoctoproject.org/#/builders/89/builds/579/steps/17/logs/stdio
https://valkyrie.yoctoproject.org/#/builders/95/builds/610/steps/13/logs/stdio

Can you have a look at this issue please ?
diff mbox series

Patch

diff --git a/meta/lib/oe/sbom30.py b/meta/lib/oe/sbom30.py
index 29cb9e45ad..08fea2aca3 100644
--- a/meta/lib/oe/sbom30.py
+++ b/meta/lib/oe/sbom30.py
@@ -267,7 +267,7 @@  class ObjectSet(oe.spdx30.SHACLObjectSet):
 
     def new_alias_id(self, obj, replace):
         unihash = self.d.getVar("BB_UNIHASH")
-        namespace = self.get_namespace() + "/"
+        namespace = self.get_namespace()
         if unihash not in obj._id:
             bb.warn(f"Unihash {unihash} not found in {obj._id}")
             return None