meta/scripts: Manual git url branch additions

Following the scripted conversion adding branches to git://
SRC_URI entries, add the remaining references, mainly in the selftests
and recipetool.

(From OE-Core rev: 87ac0c0a643cca436784dfcd86472adcf2e04130)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 5340c0d688036c1be6c938f05d8a8c1e3b49ec38)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2021-10-29 13:34:24 +01:00
parent d64469d524
commit ab13c838e4
5 changed files with 10 additions and 7 deletions

View File

@@ -389,6 +389,9 @@ def reformat_git_uri(uri):
parms.update({('protocol', 'ssh')})
elif (scheme == "http" or scheme == 'https' or scheme == 'ssh') and not ('protocol' in parms):
parms.update({('protocol', scheme)})
# We assume 'master' branch if not set
if not 'branch' in parms:
parms.update({('branch', 'master')})
# Always append 'git://'
fUrl = bb.fetch2.encodeurl(('git', host, path, user, pswd, parms))
return fUrl