Re: [yocto] Documentation around adding custom fetchers to layer
Alexander Kanavin <[email protected]>
| Newsgroups | org.yoctoproject.lists.yocto,org.openembedded.lists.bitbake-devel |
|---|---|
| Message-ID | <CANNYZj-Sk_VEMa8--q-s3G6KP1zih5KqZC4uv5WJzAd7sQrzzQ@mail.gmail.com> |
On Wed, 17 Sept 2025 at 11:15, Ross Burton via lists.yoctoproject.org <[email protected]> wrote: > > I'm not seeing any documentation on how to add a custom fetcher to a layer, and the fetchers in poky don't provide enough information on how to register these fetchers. Is this functionality supported, or will we have to fork poky and keep it up-to-date to add a new fetcher? > > This is a bitbake issue, so I’ve copied in the bitbake list. > > There’s no standard way to add out-of-bitbake fetchers, as you say you need to add the fetcher instance to bb.fetch2.methods. > > I guess you might be able to write a do_fetch prefunc that creates an instance of your fetcher and adds it to the list, but I would not be surprised if there were more places where that would be needed. > > python use_my_fetcher() { > bb.fetch2.methods.append(MyFetcher()) > } > do_fetch[prefuncs] += “use_my_fetcher” To be honest, I was going to say that custom fetchers are not supported. Doing that would fragment the ecosystem and make people invent all kinds of private magic in their builds, and subvert the promises that standard fetchers make. Perhaps it would help to step back and look at what this customer fecher does. Can we see its source? Or an extended description of how the password manager is used, what data it takes and produces, and how that data is used in actual fetching? Then we'd think of how to do this with regular fetchers. Alex