summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Zhukov <pavel@zhukoff.net>2022-11-13 11:46:39 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-01-06 17:27:39 +0000
commitf0f166aee766b4bb1f8cf8b35dfc7d406c75e6a4 (patch)
treeb23f95145543c09a76a3657799cb2d5e125d7116
parent3b2d1331487a74863e74cc0c5564004cbb1b5a4a (diff)
downloadbitbake-f0f166aee766b4bb1f8cf8b35dfc7d406c75e6a4.tar.gz
gitsm: Fix regression in gitsm submodule path parsingyocto-4.1.22022-10.2-langdale2.2.2
Commit 0361ecf7eb82c386a9842cf1f3cb706c0a112e77 introduced regression in submodules path parsing. As the result gitsm fetcher fails on each submodule which name begins from the name of the parent repo which is totally valid usecase [Yocto #14045] [1] Fix the code to error out only if submodule's name is equal to parent name but not if it's part of it. [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=14045#c4 Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3ad27272c18f2bb9edd441f840167a3dabd5407b) Signed-off-by: Steve Sakoman <steve@sakoman.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 25d5db0e5..c5f7c03c4 100644
--- a/lib/bb/fetch2/gitsm.py
+++ b/lib/bb/fetch2/gitsm.py
@@ -115,7 +115,7 @@ class GitSM(Git):
# This has to be a file reference
proto = "file"
url = "gitsm://" + uris[module]
- if "{}{}".format(ud.host, ud.path) in url:
+ if url.endswith("{}{}".format(ud.host, ud.path)):
raise bb.fetch2.FetchError("Submodule refers to the parent repository. This will cause deadlock situation in current version of Bitbake." \
"Consider using git fetcher instead.")