Skip to contentSkip to conversation

bitbake: fetch2: gitsm: fix incorrect handling of git submodule relative urls

PATCH New Gennaro Iorio 1 participant 1 message Jun 30, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake: 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.

---
 bitbake/lib/bb/fetch2/gitsm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/fetch2/gitsm.py +1 -1
index e7083001da..a307e55194 100644
@@ -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)
Signature · 1 line
2.25.1