All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul Barker" <paul@pbarker.dev>
To: "Stefano Tondo" <stondo@gmail.com>,
	<openembedded-core@lists.openembedded.org>
Cc: "Joshua Watt" <JPEWhacker@gmail.com>,
	"Alexander Kanavin" <alex.kanavin@gmail.com>,
	"Stefan Herbrechtsmeier" <stefan.herbrechtsmeier@weidmueller.com>,
	"Paul Barker" <paul@pbarker.dev>,
	"Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>,
	"Peter Marko" <peter.marko@siemens.com>,
	<stefano.tondo.ext@siemens.com>
Subject: Re: [PATCH v4 2/4] spdx30: Record the lifecycle scope of dependencies
Date: Thu, 26 Nov 2026 13:24:01 +0000	[thread overview]
Message-ID: <DN56BR66WII7.34FC67CIINIBB@pbarker.dev> (raw)
In-Reply-To: <20261125183613.1335718-3-stondo@gmail.com>

On Wed Nov 25, 2026 at 6:36 PM GMT, Stefano Tondo wrote:
> From: Stefano Tondo <stefano.tondo.ext@siemens.com>
>
> A Cargo.lock file lists the crates for all targets, and some crates
> only run at build time (build scripts, proc-macros and the crates
> they use). The fetcher downloads all of them, but only some end up in
> the binary.
>
> Add the variable SPDX_DEPENDENCY_SCOPE_FUNCS. A class adds a function
> to it that gives the downloads of a recipe a lifecycle scope. The
> create_spdx task links the build to each download with a scoped
> dependsOn relationship: runtime, build or test. A download that is
> fetched but not used on the target gets an annotation instead. The
> SPDX code does not read the files of a package manager.
>
> For Cargo, add a do_cargo_metadata task that writes the dependency
> graph for the target with cargo metadata --filter-platform, and the
> scope function oe.rust.cargo_dependency_scopes() that reads it. The
> graph has all features, because a recipe can enable features in
> several places (CARGO_BUILD_FLAGS, PACKAGECONFIG, pyproject.toml). So
> a crate counts as not used on the target only when no feature uses
> it. If cargo cannot give the graph, the task does not fail, and the
> crate downloads get no scope.
>
> The walk expands each workspace member only once. Members can depend
> on each other in a cycle, and a member can be a dev dependency of
> itself, as uv-preview is in python3-uv-build.
>
> Add unit tests for the scopes, with member cycles.

Hi Stefano,

This is an interesting patch, and I can see the value in tracking the
"lifecycle scope" for each dependency. That is a whole new concept to
add to recipes though.

I think this needs a proposal on the openembedded-architecture mailing
list [1], so that the design can be discussed.

[1]: https://lists.openembedded.org/g/openembedded-architecture

Best regards,

-- 
Paul Barker


  reply	other threads:[~2026-11-26 13:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 18:36 [PATCH v4 0/4] spdx30: identity and purls of dependency downloads Stefano Tondo
2026-11-25 18:36 ` [PATCH v4 1/4] spdx30: Take name, version and PURL of downloads from the fetcher Stefano Tondo
2026-11-25 18:36 ` [PATCH v4 2/4] spdx30: Record the lifecycle scope of dependencies Stefano Tondo
2026-11-26 13:24   ` Paul Barker [this message]
2026-11-26 23:07     ` Stefano Tondo
2026-11-25 18:36 ` [PATCH v4 3/4] spdx30: Add the PURLs of the source downloads to the output packages Stefano Tondo
2026-11-25 18:36 ` [PATCH v4 4/4] oeqa/selftest: spdx: Test crate identity, scope and output PURLs Stefano Tondo
2026-11-26 13:27   ` Paul Barker
2026-11-26 23:07     ` Stefano Tondo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DN56BR66WII7.34FC67CIINIBB@pbarker.dev \
    --to=paul@pbarker.dev \
    --cc=JPEWhacker@gmail.com \
    --cc=alex.kanavin@gmail.com \
    --cc=mathieu.dubois-briand@bootlin.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=peter.marko@siemens.com \
    --cc=stefan.herbrechtsmeier@weidmueller.com \
    --cc=stefano.tondo.ext@siemens.com \
    --cc=stondo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.