summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGennaro Iorio <gen.iorio92@gmail.com>2022-06-30 19:24:55 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-01 12:20:16 +0100
commit4a0bd3bcd1f7fc25364df8bbf185ff64881c015b (patch)
tree83b9875f4d444bf5eb16dd25cc95cae415326c80
parentd3e64f64525187f1409531a0bd99df576e627f7f (diff)
downloadbitbake-4a0bd3bcd1f7fc25364df8bbf185ff64881c015b.tar.gz
fetch2: gitsm: fix incorrect handling of git submodule relative urls
As specified by git submodule manual relative urls can start either with '..' or './', second case was incorrectly managed leading to an interpretation of urls starting with './' as absoulte urls. Signed-off-by: Gennaro Iorio <gennaro.iorio@schindler.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/gitsm.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py
index c5c23d526..c1950e481 100644
--- a/lib/bb/fetch2/gitsm.py
+++ b/lib/bb/fetch2/gitsm.py
@@ -88,7 +88,7 @@ class GitSM(Git):
subrevision[m] = module_hash.split()[2]
# Convert relative to absolute uri based on parent uri
- if uris[m].startswith('..'):
+ if uris[m].startswith('..') or uris[m].startswith('./'):
newud = copy.copy(ud)
newud.path = os.path.realpath(os.path.join(newud.path, uris[m]))
uris[m] = Git._get_repo_url(self, newud)