diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2012-06-14 16:44:02 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-21 13:21:23 +0100 |
commit | fa7c2b074354b0f1ec2614b2f339b7d3bf08c7e7 (patch) | |
tree | e0e773e5d81766a4480b90e2d559f822aa099826 /bitbake | |
parent | dee397af9064a54f6e14d64a839571e47f9fdfcd (diff) | |
download | poky-fa7c2b074354b0f1ec2614b2f339b7d3bf08c7e7.tar.gz |
bitbake: fetch2/git.py: Optimize clone fall back when it is local
A file:// url should use "clone -l" to greatly speed
up the clone in the case of a kernel when it is local.
(Bitbake rev: 2bab2cc3ffe67ee2a308074a6e4c2c7be5636d2f)
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index ecc5e0ded8..07d722a156 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -188,7 +188,9 @@ class Git(FetchMethod): | |||
188 | 188 | ||
189 | # If the repo still doesn't exist, fallback to cloning it | 189 | # If the repo still doesn't exist, fallback to cloning it |
190 | if not os.path.exists(ud.clonedir): | 190 | if not os.path.exists(ud.clonedir): |
191 | clone_cmd = "%s clone --bare --mirror %s %s" % (ud.basecmd, repourl, ud.clonedir) | 191 | if repourl.startswith("file://"): |
192 | repourl = repourl[7:] | ||
193 | clone_cmd = "%s clone -l --bare --mirror %s %s" % (ud.basecmd, repourl, ud.clonedir) | ||
192 | if ud.proto.lower() != 'file': | 194 | if ud.proto.lower() != 'file': |
193 | bb.fetch2.check_network_access(d, clone_cmd) | 195 | bb.fetch2.check_network_access(d, clone_cmd) |
194 | runfetchcmd(clone_cmd, d) | 196 | runfetchcmd(clone_cmd, d) |