Received: from mail.windriver.com ([147.11.1.11]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1SfI06-0000n4-Oq for bitbake-devel@lists.openembedded.org; Thu, 14 Jun 2012 23:54:47 +0200 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id q5ELi8Ks029495 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Thu, 14 Jun 2012 14:44:08 -0700 (PDT) Received: from ord-jrw.wrs.com (172.25.32.41) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server id 14.1.255.0; Thu, 14 Jun 2012 14:44:07 -0700 From: Jason Wessel To: Date: Thu, 14 Jun 2012 16:44:02 -0500 Message-ID: <1339710244-6755-2-git-send-email-jason.wessel@windriver.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1339710244-6755-1-git-send-email-jason.wessel@windriver.com> References: <1339710244-6755-1-git-send-email-jason.wessel@windriver.com> MIME-Version: 1.0 Subject: [PATCH v2 1/3] fetch2/git.py: Optimize clone fall back when it is local X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jun 2012 21:54:47 -0000 Content-Type: text/plain A file:// url should use "clone -l" to greatly speed up the clone in the case of a kernel when it is local. Signed-off-by: Jason Wessel --- lib/bb/fetch2/git.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py index ecc5e0d..07d722a 100644 --- a/lib/bb/fetch2/git.py +++ b/lib/bb/fetch2/git.py @@ -188,7 +188,9 @@ class Git(FetchMethod): # If the repo still doesn't exist, fallback to cloning it if not os.path.exists(ud.clonedir): - clone_cmd = "%s clone --bare --mirror %s %s" % (ud.basecmd, repourl, ud.clonedir) + if repourl.startswith("file://"): + repourl = repourl[7:] + clone_cmd = "%s clone -l --bare --mirror %s %s" % (ud.basecmd, repourl, ud.clonedir) if ud.proto.lower() != 'file': bb.fetch2.check_network_access(d, clone_cmd) runfetchcmd(clone_cmd, d) -- 1.7.10