From 9c80f22d37b3ae6acc5051459bf8bba2ddb8c294 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 29 Sep 2025 14:56:11 +0200 Subject: [PATCH] bitbake: bitbake-setup: Allow local registry paths 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. (Bitbake rev: ec82a6d402a0bec5704310c66c6f4206c75e4fc9) Signed-off-by: Richard Purdie --- bitbake/bin/bitbake-setup | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bitbake/bin/bitbake-setup b/bitbake/bin/bitbake-setup index d6509500d8..b07bf2eb7c 100755 --- a/bitbake/bin/bitbake-setup +++ b/bitbake/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):