diff options
author | Pavel Zhukov <pavel@zhukoff.net> | 2022-08-26 10:40:29 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-31 12:21:17 +0100 |
commit | 0361ecf7eb82c386a9842cf1f3cb706c0a112e77 (patch) | |
tree | 0ea8fbccf484f61bbe0f871588d417a2486c6eb5 | |
parent | 2cd76e8aabe4e803c760e60f06cfe1f470714ec7 (diff) | |
download | bitbake-contrib-0361ecf7eb82c386a9842cf1f3cb706c0a112e77.tar.gz |
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]
Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/fetch2/gitsm.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py index c1950e481..25d5db0e5 100644 --- a/lib/bb/fetch2/gitsm.py +++ b/lib/bb/fetch2/gitsm.py @@ -115,6 +115,9 @@ class GitSM(Git): # This has to be a file reference proto = "file" url = "gitsm://" + uris[module] + if "{}{}".format(ud.host, ud.path) in url: + 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.") url += ';protocol=%s' % proto url += ";name=%s" % module |