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 <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2025-09-29 14:56:11 +02:00
parent 4e94ef6f0b
commit 9c80f22d37

View File

@@ -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):