Message ID | 20250922140721.2266610-1-richard.purdie@linuxfoundation.org |
---|---|
State | New |
Headers | show |
Series | [1/3] bitbake-setup: Allow local registry paths | expand |
Just to be clear, all three lgtm. Alex On Mon, 22 Sept 2025 at 16:07, Richard Purdie via lists.openembedded.org <richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote: > > It is useful for bitbake-setup to support local paths without access through > the fetcher so that internal data to the bitbake repository can be used as > a default. > > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> > --- > bin/bitbake-setup | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/bin/bitbake-setup b/bin/bitbake-setup > index d6509500d86..b07bf2eb7c8 100755 > --- a/bin/bitbake-setup > +++ b/bin/bitbake-setup > @@ -509,10 +509,15 @@ def do_fetch(fetcher, dir): > > def update_registry(registry, cachedir, d): > registrydir = 'configurations' > - full_registrydir = os.path.join(cachedir, registrydir) > - print("Fetching configuration registry\n {}\ninto\n {}".format(registry, full_registrydir)) > - fetcher = bb.fetch.Fetch(["{};destsuffix={}".format(registry, registrydir)], d) > - do_fetch(fetcher, cachedir) > + if registry.startswith("."): > + full_registrydir = os.path.join(os.getcwd(), registry, registrydir) > + elif registry.startswith("/"): > + full_registrydir = os.path.join(registry, registrydir) > + else: > + full_registrydir = os.path.join(cachedir, registrydir) > + print("Fetching configuration registry\n {}\ninto\n {}".format(registry, full_registrydir)) > + fetcher = bb.fetch.Fetch(["{};destsuffix={}".format(registry, registrydir)], d) > + do_fetch(fetcher, cachedir) > return full_registrydir > > def has_expired(expiry_date): > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#18070): https://lists.openembedded.org/g/bitbake-devel/message/18070 > Mute This Topic: https://lists.openembedded.org/mt/115376054/1686489 > Group Owner: bitbake-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/bin/bitbake-setup b/bin/bitbake-setup index d6509500d86..b07bf2eb7c8 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -509,10 +509,15 @@ def do_fetch(fetcher, dir): def update_registry(registry, cachedir, d): registrydir = 'configurations' - full_registrydir = os.path.join(cachedir, registrydir) - print("Fetching configuration registry\n {}\ninto\n {}".format(registry, full_registrydir)) - fetcher = bb.fetch.Fetch(["{};destsuffix={}".format(registry, registrydir)], d) - do_fetch(fetcher, cachedir) + if registry.startswith("."): + full_registrydir = os.path.join(os.getcwd(), registry, registrydir) + elif registry.startswith("/"): + full_registrydir = os.path.join(registry, registrydir) + else: + full_registrydir = os.path.join(cachedir, registrydir) + print("Fetching configuration registry\n {}\ninto\n {}".format(registry, full_registrydir)) + fetcher = bb.fetch.Fetch(["{};destsuffix={}".format(registry, registrydir)], d) + do_fetch(fetcher, cachedir) return full_registrydir def has_expired(expiry_date):
It is useful for bitbake-setup to support local paths without access through the fetcher so that internal data to the bitbake repository can be used as a default. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- bin/bitbake-setup | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)