diff mbox series

[1/1] gitsm.py: process_submodules(): Set nobranch=1 for url

Message ID ae52688eb26799338abf1c6a6a7f29d7acce39dc.1667988645.git.liezhi.yang@windriver.com
State Accepted, archived
Commit 0ed7c75eb0508a1f699f47d7f22d559501865f61
Headers show
Series [1/1] gitsm.py: process_submodules(): Set nobranch=1 for url | expand

Commit Message

Robert Yang Nov. 9, 2022, 10:11 a.m. UTC
Just like download_submodule() does, fixed warings when run
bb.fetch2.Fetch([url], d) in process_submodules' function:

WARNING: grpc-native-1.50.0-r0 do_fetch: URL: gitsm://github.com/abseil/abseil-cpp.git;protocol=https;name=third_party/abseil-cpp;subpath=third_party/abseil-cpp does not set any branch parameter. The future default branch used by tools and repositories is uncertain and we will therefore soon require this is set in all git urls.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 bitbake/lib/bb/fetch2/gitsm.py | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py
index 25d5db0e5b6..e4bce3d5bef 100644
--- a/bitbake/lib/bb/fetch2/gitsm.py
+++ b/bitbake/lib/bb/fetch2/gitsm.py
@@ -122,6 +122,7 @@  class GitSM(Git):
             url += ';protocol=%s' % proto
             url += ";name=%s" % module
             url += ";subpath=%s" % module
+            url += ";nobranch=1"
 
             ld = d.createCopy()
             # Not necessary to set SRC_URI, since we're passing the URI to