On Thu, 2026-03-12 at 16:38 +0100, Stefano Tondo via lists.openembedded.org 
wrote:
> From: Stefano Tondo <[email protected]>
> 
> Have each ecosystem bbclass set its own Package URL by prepending to
> SPDX_PACKAGE_URLS, rather than detecting inherited classes from the
> SPDX code. This follows the principle that each class should know how
> to describe itself.
> 
> The following bbclasses now generate ecosystem PURLs:
>   - pypi.bbclass:         pkg:pypi/<normalized-name>@PV
>   - npm.bbclass:          pkg:npm/<name>@PV
>   - cargo_common.bbclass: pkg:cargo/<name>@PV
>   - go-mod.bbclass:       pkg:golang/<GO_IMPORT>@PV
>   - cpan.bbclass:         pkg:cpan/<name>@PV
> 
> Additional ecosystems (nuget, maven, dotnet) can follow the same
> pattern in their respective layers.
> 
> Signed-off-by: Stefano Tondo <[email protected]>
> ---
>  meta/classes-recipe/cargo_common.bbclass |  3 +++
>  meta/classes-recipe/cpan.bbclass         | 11 +++++++++++
>  meta/classes-recipe/go-mod.bbclass       |  3 +++
>  meta/classes-recipe/npm.bbclass          |  7 +++++++
>  meta/classes-recipe/pypi.bbclass         |  3 +++
>  5 files changed, 27 insertions(+)
> 
> diff --git a/meta/classes-recipe/cargo_common.bbclass 
> b/meta/classes-recipe/cargo_common.bbclass
> index bc44ad7918..e884b344ef 100644
> --- a/meta/classes-recipe/cargo_common.bbclass
> +++ b/meta/classes-recipe/cargo_common.bbclass
> @@ -240,3 +240,6 @@ EXPORT_FUNCTIONS do_configure
>  # https://github.com/rust-lang/libc/issues/3223
>  # https://github.com/rust-lang/libc/pull/3175
>  INSANE_SKIP:append = " 32bit-time"
> +
> +# Generate ecosystem-specific Package URL for SPDX
> +SPDX_PACKAGE_URLS:prepend = "pkg:cargo/${BPN}@${PV} "

Rather than using :prepend, can we just use the =+/+= operators here?

I understand that does introduce ordering constraints but those should
already be handled with spdx being on by default.

Cheers,

Richard

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

Reply via email to