repos: Fix relative path for repos
If a repo path is relative, append the kas work dir to it. Background: The path ends up in bblayers.conf Without this change the following example will fail: -------------------------------------------------------- header: version: 4 machine: qemux86 repos: poky: url: "https://git.yoctoproject.org/git/poky" refspec: "rocko" path: "thirdparty/poky" layers: meta: meta-poky: -------------------------------------------------------- Signed-off-by: Georg Lutz <georg@georglutz.de>
This commit is contained in:
parent
37cd2f42d5
commit
7fa75d94c0
@ -338,6 +338,7 @@ Configuration reference
|
|||||||
If the ``url`` as well as the ``path`` is defined, the path is used to
|
If the ``url`` as well as the ``path`` is defined, the path is used to
|
||||||
overwrite the checkout directory, that defaults to ``kas_work_dir``
|
overwrite the checkout directory, that defaults to ``kas_work_dir``
|
||||||
+ ``repo.name``.
|
+ ``repo.name``.
|
||||||
|
In case of a relative path name ``kas_work_dir`` is prepended.
|
||||||
|
|
||||||
* ``layers``: dict [optional]
|
* ``layers``: dict [optional]
|
||||||
Contains the layers from this repository that should be added to the
|
Contains the layers from this repository that should be added to the
|
||||||
|
@ -96,7 +96,12 @@ class Repo:
|
|||||||
url = path
|
url = path
|
||||||
disable_operations = True
|
disable_operations = True
|
||||||
else:
|
else:
|
||||||
path = path or os.path.join(config.kas_work_dir, name)
|
if path is None:
|
||||||
|
path = os.path.join(config.kas_work_dir, name)
|
||||||
|
else:
|
||||||
|
if not os.path.isabs(path):
|
||||||
|
# Relative pathes are assumed to start from work_dir
|
||||||
|
path = os.path.join(config.kas_work_dir, path)
|
||||||
|
|
||||||
if typ == 'git':
|
if typ == 'git':
|
||||||
return GitRepo(url, path, refspec, layers, disable_operations)
|
return GitRepo(url, path, refspec, layers, disable_operations)
|
||||||
|
Loading…
Reference in New Issue
Block a user