On Thu Jan 8, 2026 at 12:20 AM CET, Joshua Watt via lists.openembedded.org
wrote:
> Adds code to add PURLs to packages based on the PURL specification for
> Yocto packages [1].
>
> The SPDX_PACKAGE_URL variable is renamed SPDX_PACKAGE_URLS to make it
> clear that it can now be a list of PURLs. SPDX_PACKAGE_URL is retained,
> but marked as deprecated.
>
> [1]:
> https://github.com/package-url/purl-spec/blob/main/types-doc/yocto-definition.md
>
> Signed-off-by: Joshua Watt <[email protected]>
> ---
Hi Joshua,
Thanks for your patch.
> --- a/meta/lib/oe/spdx_common.py
> +++ b/meta/lib/oe/spdx_common.py
> @@ -10,6 +10,7 @@ import json
> import oe.packagedata
> import re
> import shutil
> +import urllib.parse
>
> from pathlib import Path
> from dataclasses import dataclass
> @@ -288,3 +289,14 @@ def get_compiled_sources(d):
> types.add(ext)
> bb.debug(1, f"Num of sources: {len(sources)} and types: {len(types)}
> {str(types)}")
> return sources, types
> +
> +
> +def purl_quote(s):
> + return urllib.parse.quote(s, safe="")
> +
> +
> +def get_base_purl(d):
> + layername = d.getVar("FILE_LAYERNAME").lower()
> + bpn = d.getVar("BPN").lower()
> + pv = d.getVar("PV")
> + return
> f"pkg:yocto/{purl_quote(layername)}/{purl_quote(bpn)}@{purl_quote(pv)}"
It looks like sometimes, FILE_LAYERNAME is not defined during selftests:
2026-01-08 12:00:20,364 - oe-selftest - INFO -
buildoptions.ImageOptionsTests.test_ccache_tool (subunit.RemotedTestCase)
2026-01-08 12:00:20,365 - oe-selftest - INFO - ... FAIL
...
ERROR: Unable to read
virtual:native:/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/recipes-devtools/ccache/ccache_4.12.2.bb
Traceback (most recent call last):
File
"/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/lib/bb/data_smart.py",
line 465, in expandWithRefs
s = __expand_python_regexp__.sub(varparse.python_sub, s)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/lib/bb/data_smart.py",
line 154, in python_sub
value = utils.better_eval(codeobj, DataContext(self.d), {'d' : self.d})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/bitbake/lib/bb/utils.py",
line 489, in better_eval
return eval(source, ctx, locals)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "Var <SPDX_PACKAGE_URLS>", line 1, in <module>
File
"/srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/lib/oe/spdx_common.py",
line 299, in get_base_purl
layername = d.getVar("FILE_LAYERNAME").lower()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'lower'
...
2026-01-08 12:04:59,178 - oe-selftest - INFO -
fitimage.UBootFitImageTests.test_sign_cascaded_uboot_fit_image
(subunit.RemotedTestCase)
2026-01-08 12:04:59,179 - oe-selftest - INFO - ... FAIL
...
2026-01-08 12:06:05,604 - oe-selftest - INFO -
fitimage.UBootFitImageTests.test_sign_standalone_uboot_atf_tee_fit_image
(subunit.RemotedTestCase)
2026-01-08 12:06:05,604 - oe-selftest - INFO - ... FAIL
...
2026-01-08 12:06:58,169 - oe-selftest - INFO -
fitimage.UBootFitImageTests.test_sign_standalone_uboot_fit_image
(subunit.RemotedTestCase)
2026-01-08 12:06:58,169 - oe-selftest - INFO - ... FAIL
...
2026-01-08 12:07:40,880 - oe-selftest - INFO -
fitimage.UBootFitImageTests.test_sign_uboot_fit_image_without_spl
(subunit.RemotedTestCase)
2026-01-08 12:07:40,880 - oe-selftest - INFO - ... FAIL
...
2026-01-08 12:08:11,262 - oe-selftest - INFO -
fitimage.UBootFitImageTests.test_sign_uboot_kernel_individual
(subunit.RemotedTestCase)
2026-01-08 12:08:11,262 - oe-selftest - INFO - ... FAIL
...
2026-01-08 12:08:50,675 - oe-selftest - INFO -
fitimage.UBootFitImageTests.test_uboot_atf_tee_fit_image
(subunit.RemotedTestCase)
2026-01-08 12:08:50,675 - oe-selftest - INFO - ... FAIL
...
026-01-08 12:08:50,857 - oe-selftest - INFO -
liboe.CopyTreeTests.test_copy_tree_xattr (subunit.RemotedTestCase)
2026-01-08 12:08:50,857 - oe-selftest - INFO - ... FAIL
...
2026-01-08 12:09:29,398 - oe-selftest - INFO -
fitimage.UBootFitImageTests.test_uboot_fit_image (subunit.RemotedTestCase)
2026-01-08 12:09:29,399 - oe-selftest - INFO - ... FAIL
...
2026-01-08 12:20:27,984 - oe-selftest - INFO -
fitimage.KernelFitImageRecipeTests.test_fit_image (subunit.RemotedTestCase)
2026-01-08 12:20:27,984 - oe-selftest - INFO - ... FAIL
...
2026-01-08 12:21:02,937 - oe-selftest - INFO -
recipetool.RecipetoolCreateTests.test_recipetool_create_go
(subunit.RemotedTestCase)
2026-01-08 12:21:02,937 - oe-selftest - INFO - ... FAIL
...
2026-01-08 12:21:03,484 - oe-selftest - INFO -
fitimage.KernelFitImageRecipeTests.test_fit_image_ext_dtb_dtbo
(subunit.RemotedTestCase)
2026-01-08 12:21:03,484 - oe-selftest - INFO - ... FAIL
...
2026-01-08 12:21:34,129 - oe-selftest - INFO -
fitimage.KernelFitImageRecipeTests.test_fit_image_sign_initramfs
(subunit.RemotedTestCase)
2026-01-08 12:21:34,129 - oe-selftest - INFO - ... FAIL
...
2026-01-08 12:22:00,488 - oe-selftest - INFO -
fitimage.KernelFitImageRecipeTests.test_fit_image_sign_initramfs_bundle
(subunit.RemotedTestCase)
2026-01-08 12:22:00,489 - oe-selftest - INFO - ... FAIL
...
2026-01-08 12:22:23,908 - oe-selftest - INFO -
fitimage.KernelFitImageRecipeTests.test_get_compatible_from_dtb
(subunit.RemotedTestCase)
2026-01-08 12:22:23,909 - oe-selftest - INFO - ... FAIL
...
2026-01-08 12:22:50,980 - oe-selftest - INFO -
fitimage.KernelFitImageRecipeTests.test_sign_fit_image_configurations
(subunit.RemotedTestCase)
2026-01-08 12:22:50,980 - oe-selftest - INFO - ... FAIL
...
2026-01-08 12:23:38,183 - oe-selftest - INFO -
fitimage.KernelFitImageRecipeTests.test_sign_fit_image_individual
(subunit.RemotedTestCase)
2026-01-08 12:23:38,184 - oe-selftest - INFO - ... FAIL
I did not copy the exact error for each test fail, but is is basically
the same every times.
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/2986
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/2877
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3124
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 (#229071):
https://lists.openembedded.org/g/openembedded-core/message/229071
Mute This Topic: https://lists.openembedded.org/mt/117144146/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-