On Mon Nov 17, 2025 at 2:04 PM CET, Stefano Tondo 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]>
>
> ---
> Changes in v2:
> - Fixed test bugs: corrected SPDX file path from packages/ to recipes/
> - Fixed test bugs: removed parentheses from objset.objects() call
> - Fixed whitespace formatting in test code
> ---

Hi Stefano,

Thanks for the v2, but it looks like the test is still failing with a
similar error:

2025-11-18 18:36:56,500 - oe-selftest - INFO - 
spdx.SPDX30Check.test_custom_annotation_vars (subunit.RemotedTestCase)
2025-11-18 18:36:56,500 - oe-selftest - INFO -  ... FAIL
...
  File 
"/srv/pokybuild/yocto-worker/oe-selftest-debian/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.13/unittest/case.py", line 1309, in assertIsNotNone
    self.fail(self._formatMessage(msg, standardMsg))
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/unittest/case.py", line 732, in fail
    raise self.failureException(msg)
AssertionError: unexpectedly None : Unable to find Build element

https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/2716
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/2610
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2852

Can you have a look at these?

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 (#226543): 
https://lists.openembedded.org/g/openembedded-core/message/226543
Mute This Topic: https://lists.openembedded.org/mt/116336991/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to