aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-07 13:18:52 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-08 13:58:08 +0000
commit221d864042658daa054281aab439b44d54fe94d7 (patch)
treec8806b66b0596406799c9af94291c67a50553a66 /bitbake
parent46d62d076dd08c57f87b10be098cf47b34c41176 (diff)
downloadopenembedded-core-contrib-221d864042658daa054281aab439b44d54fe94d7.tar.gz
bitbake: fetch/git: Change to use clearer ssh url syntax for broken servers
Some servers, e.g. bitbucket.org can't cope with ssh:// as part of the git url syntax. git itself is happy enough with this but you get server side errors when using it. This changes the git fetcher to use the more common ssh url format which also means we need a : before the path. Seems a shame to have to do this due to broken servers however it should be safe enough since this other form is the one most people use on the commandline so it should be safe enough. [YOCTO #8864] (Bitbake rev: 4193e99adce8e88f12ac88d7578ad39575f7e346) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/git.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 5ffab22056..10ba1d3a61 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -330,6 +330,10 @@ class Git(FetchMethod):
username = ud.user + '@'
else:
username = ""
+ if ud.proto == "ssh":
+ # Some servers, e.g. bitbucket.org can't cope with ssh://
+ # and removing that means we need a : before path.
+ return "%s%s:%s" % (username, ud.host, ud.path)
return "%s://%s%s%s" % (ud.proto, username, ud.host, ud.path)
def _revision_key(self, ud, d, name):