Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Stefan Herbrechtsmeier
	<stefan.herbrechtsmeier-oss@weidmueller.com>,
	 openembedded-core@lists.openembedded.org,
	Bruce Ashfield	 <bruce.ashfield@gmail.com>,
	bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: Re: [bitbake-devel] 'vendor' fetching discussion cont.
Date: Mon, 17 Feb 2025 12:43:48 +0000	[thread overview]
Message-ID: <d30c619392f62f2d40320b01da5ca95369f3e7c2.camel@linuxfoundation.org> (raw)
In-Reply-To: <55925709-d3e9-49c8-a6fc-f97c611146cc@weidmueller.com>

On Mon, 2025-02-17 at 12:00 +0100, Stefan Herbrechtsmeier wrote:
>  Am 13.02.2025 um 11:43 schrieb Richard Purdie via lists.openembedded.org:
>  
> > e) add the ability to add custom hooks in the fetch process to
> > handle
> > the cases of needing to alter the flow for patching the components
> > list
> >  
> I fear this isn't easy possible and we have a design problem. Bitbake
> and oe-core assume that a patch doesn't influence the fetch and that
> the SRC_URI contains all fetched sources. Many code use the Fetch
> class or the SRC_URI direct and doesn't expect recursive implicit
> URIs of gitsm. In reality the SRC_URI describe the given URIs only
> and doesn't contain the additional implicit URIs. The task flow
> applies patches after the unpack and prevent patches to the gitsm. In
> reality a patch could influence the implicit URIs and isn't
> independent.
> 
> I would recommend to keep the patching outside of bitbake and instead
> handle the implicit URIs inside oe-core. We could write the implicit
> URIs into files in the work directory and migrate the scattered
> direct users of the SRC_URI / Fetch class to a common oe-core
> function. This functions returns the given URIs and optional any
> additional implicit URIs. This allows the usage of the task
> dependencies to ensure that the implicit URIs are resolved before
> use.
> 
> The package manager lock file needs a single unpack and patch step
> whereas the gitsm needs a recursive unpack and patch of every
> successive gitsm. This makes it impossible to use additional tasks.
> We could add the resolve of the implicit URIs to the fetch task to
> support recursive resolve (gitsm).
>  
> 1. download SRC_URIs
> 2. exit if no URI is marked as unresolved
> 3. unpack unresolved URIs
> 4. apply associated patches
> 5. resolve URIs
> 6. goto 2 
>  
> This will eliminate the need for the partial implicit URI and gitsm
> support in bitbake and makes the fetcher code simpler. The patching
> could remain in oe-core and patches could be applied to gitsm and
> package manager lock files. Additionally we remove code duplication
> and simplify future changes to the SRC_URI determination.
> 
> It will add an indirection for the SRC_URI but the current code
> already shows that this makes problems. Only the archiver class uses
> the expanded_urldata function and all other classes including the
> spdx class ignore the implicit SRC_URIs.

I'm a bit worried we're getting caught up by the terminology. We don't
necessarily have to "patch" the component list so much as allow
something like a function to hook and adjust things. That then removes
the need for it to be a specific task.

I'm also not sure that drawing gitsm into this is a great idea when it
is effectively already working  quite well. I appreciate the desire to
have neat abstractions applying accross everything equally but I'm not
sure we can achieve that with the level of usability we need and I'd
rather improve usability at the cost of the inclusion of gitsm, which
is the most functional fetcher we currently have in this group.

I will repeat again that I do strongly feel that a strong API in
bitbake is going to lead to an overall better design that something
bolted onto the fetcher in OE-Core.

Cheers,

Richard






  reply	other threads:[~2025-02-17 12:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13 10:43 'vendor' fetching discussion cont Richard Purdie
2025-02-13 16:33 ` [bitbake-devel] " Stefan Herbrechtsmeier
2025-02-13 20:32   ` Richard Purdie
2025-02-14 15:38     ` Stefan Herbrechtsmeier
2025-02-13 17:34 ` Bruce Ashfield
2025-02-14 12:46   ` Stefan Herbrechtsmeier
2025-02-17 11:00 ` [bitbake-devel] " Stefan Herbrechtsmeier
2025-02-17 12:43   ` Richard Purdie [this message]
2025-02-17 16:38     ` Stefan Herbrechtsmeier
2025-02-17 17:29       ` Richard Purdie
2025-02-18 17:17         ` Bruce Ashfield
2025-02-19 16:48         ` Stefan Herbrechtsmeier
2025-02-19 17:33           ` Richard Purdie
2025-02-20  9:48             ` Stefan Herbrechtsmeier
2025-02-20 10:00               ` Richard Purdie
2025-02-20 16:01                 ` Stefan Herbrechtsmeier

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=d30c619392f62f2d40320b01da5ca95369f3e7c2.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=bruce.ashfield@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=stefan.herbrechtsmeier-oss@weidmueller.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox