On Thu Nov 13, 2025 at 7:41 PM CET, Stefano Tondo via lists.openembedded.org 
wrote:
> From: Stefano Tondo <[email protected]>
>
> Fix incorrect function call when processing SPDX_CUSTOM_ANNOTATION_VARS.
> The code was calling new_annotation() as a standalone function, but it
> should be called as a method on the build_objset object.
>
> Error:
>     new_annotation(d, build_objset, build, ...)
>
> Corrected to:
>     build_objset.new_annotation(d, build_objset, build, ...)
>
> This bug would cause a NameError at runtime if SPDX_CUSTOM_ANNOTATION_VARS
> was set to a non-empty value, preventing SPDX document generation.
>
> The fix aligns with how new_annotation() is called elsewhere in the
> codebase and matches the SBOMObjset class method signature.
>
> Signed-off-by: Stefano Tondo <[email protected]>
> ---

Hi Stefano,

Thanks for your patch.

It looks like the new test is failing on the autobuilder:

2025-11-15 11:49:34,729 - oe-selftest - INFO - 
spdx.SPDX30Check.test_custom_annotation_vars (subunit.RemotedTestCase)
2025-11-15 11:49:34,730 - oe-selftest - INFO -  ... FAIL
...
2025-11-15 11:49:34,730 - oe-selftest - INFO - 3: 37/41 297/643 (40.52s) (0 
failed) (spdx.SPDX30Check.test_custom_annotation_vars)
2025-11-15 11:49:34,730 - oe-selftest - INFO - 
testtools.testresult.real._StringException: Traceback (most recent call last):
  File 
"/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/spdx.py",
 line 330, in test_custom_annotation_vars
    self.assertIsNotNone(build, "Unable to find Build element")
  File "/usr/lib/python3.12/unittest/case.py", line 1287, in assertIsNotNone
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib/python3.12/unittest/case.py", line 715, in fail
    raise self.failureException(msg)
AssertionError: unexpectedly None : Unable to find Build element

https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2835
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/2699
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/2593

Can you have a loot at the issue?

Thanks,
Mathieu

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#226464): 
https://lists.openembedded.org/g/openembedded-core/message/226464
Mute This Topic: https://lists.openembedded.org/mt/116279440/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to