summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorMike Crowe <mac@mcrowe.com>2023-02-24 16:50:54 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-26 11:49:41 +0000
commitc1f1422a95e1939e00d8cda9523b1a99d051cd14 (patch)
tree453f87759d358bc0acbb56e7a700bdc64b25f7fb /bitbake/lib/bb/fetch2
parentc08e2c2e20e89f8d825c19ed3032d27fc0b022dc (diff)
downloadpoky-c1f1422a95e1939e00d8cda9523b1a99d051cd14.tar.gz
bitbake: gitsm: Fix path construction for relative submodule URI
The submodule repository URI contains a path to something not necessarily on the local filesystem. This means that we can't use realpath to normalise it without risking getting bad results if the path happens to match something on the local filesystem. This situation can cause very confusing errors if that matching local path happens to be a symlink to somewhere else. Using normpath rather than realpath means that the path simplification follows simple rules on the string rather than looking at the local filesystem and avoids problems. (Bitbake rev: 47b271e6c8d96960ebe70f80e58f30cc4cbf42e1) Signed-off-by: Mike Crowe <mac@mcrowe.com> Co-authored-by: Dave Craig Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/gitsm.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py
index fee40cdcb4..f8e239bc5d 100644
--- a/bitbake/lib/bb/fetch2/gitsm.py
+++ b/bitbake/lib/bb/fetch2/gitsm.py
@@ -90,7 +90,7 @@ class GitSM(Git):
90 # Convert relative to absolute uri based on parent uri 90 # Convert relative to absolute uri based on parent uri
91 if uris[m].startswith('..') or uris[m].startswith('./'): 91 if uris[m].startswith('..') or uris[m].startswith('./'):
92 newud = copy.copy(ud) 92 newud = copy.copy(ud)
93 newud.path = os.path.realpath(os.path.join(newud.path, uris[m])) 93 newud.path = os.path.normpath(os.path.join(newud.path, uris[m]))
94 uris[m] = Git._get_repo_url(self, newud) 94 uris[m] = Git._get_repo_url(self, newud)
95 95
96 for module in submodules: 96 for module in submodules: