summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPavel Zhukov <pavel@zhukoff.net>2022-08-26 10:40:29 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-10-11 21:57:28 +0100
commit189a6d452e3037c9e94ccdf6af38359fc6058064 (patch)
tree07217f6e7bbb76080a8bd8b1e363a8c1227ba2ec /bitbake
parent4b9ac6d5aa92a54667c38de2dd1478d0e7ec5739 (diff)
downloadpoky-189a6d452e3037c9e94ccdf6af38359fc6058064.tar.gz
bitbake: gitsm: Error out if submodule refers to parent repo
If submodule refers to specific revision of the parent repository it causes deadlock in bitbake locking mechanism (lock is acquired to fetch the parent and cannot be released before all submodules are fetched). raise FetchError in such situation to prevent deadlocking. [Yocto 14045] (Bitbake rev: 987712c4c8fefd86a1f5116c11ee86e296e852ee) Signed-off-by: Pavel Zhukov <pavel@zhukoff.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0361ecf7eb82c386a9842cf1f3cb706c0a112e77) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/gitsm.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py
index c1950e4819..25d5db0e5b 100644
--- a/bitbake/lib/bb/fetch2/gitsm.py
+++ b/bitbake/lib/bb/fetch2/gitsm.py
@@ -115,6 +115,9 @@ class GitSM(Git):
115 # This has to be a file reference 115 # This has to be a file reference
116 proto = "file" 116 proto = "file"
117 url = "gitsm://" + uris[module] 117 url = "gitsm://" + uris[module]
118 if "{}{}".format(ud.host, ud.path) in url:
119 raise bb.fetch2.FetchError("Submodule refers to the parent repository. This will cause deadlock situation in current version of Bitbake." \
120 "Consider using git fetcher instead.")
118 121
119 url += ';protocol=%s' % proto 122 url += ';protocol=%s' % proto
120 url += ";name=%s" % module 123 url += ";name=%s" % module