From 43e98fb4551fe728be3544e982ac70f4056d49e9 Mon Sep 17 00:00:00 2001 From: Gennaro Iorio Date: Tue, 13 Sep 2022 04:26:38 -1000 Subject: [PATCH] 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 rev: d828cd2a16ddf4f084e61ffe44471483e132653a) Signed-off-by: Gennaro Iorio Signed-off-by: Richard Purdie (cherry picked from commit 4a0bd3bcd1f7fc25364df8bbf185ff64881c015b) Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/gitsm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py index c5c23d5260..c1950e4819 100644 --- a/bitbake/lib/bb/fetch2/gitsm.py +++ b/bitbake/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)