From 1f1a21992d03dddd9fc93bab4880c6b0ef97d41b Mon Sep 17 00:00:00 2001 From: Silvano Cirujano Cuesta Date: Wed, 16 Dec 2020 17:55:42 +0100 Subject: [PATCH] repos: fix path if no url, but path given The `repo` documentation says: "If the url is missing and the path defined, this entry references the directory the path points to. [...] In case of a relative path name `kas_work_dir` is prepended." But if no `url` is given and a relative path is given in `path`, then the layer paths being added to `bblayer.conf` are missing the `kas_work_dir` prefix. This patch fixes it. Signed-off-by: Silvano Cirujano Cuesta Signed-off-by: Jan Kiszka --- kas/repos.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kas/repos.py b/kas/repos.py index b87ca37..8b5e517 100644 --- a/kas/repos.py +++ b/kas/repos.py @@ -120,6 +120,10 @@ class Repo: path = Repo.get_root_path(repo_fallback_path) logging.info('Using %s as root for repository %s', path, name) + else: + if not os.path.isabs(path): + # Relative pathes are assumed to start from work_dir + path = os.path.join(get_context().kas_work_dir, path) url = path disable_operations = True