Patchwork [bitbake-devel] Remove -l option, its not necessary

mail settings
Submitter Richard Purdie
Date June 22, 2012, 11:52 a.m.
Message ID <1340365950.394.14.camel@ted>
Download mbox | patch
Permalink /patch/30459/
State New
Headers show


Richard Purdie - June 22, 2012, 11:52 a.m.
If -l is specified and the source and destination are not on a common
filesystem an error occurs. The -l option is however the default for
git for local paths which the fetcher already now ensures in the
file:// case.

We can therefore safely drop the -l option.

Signed-off-by: Richard Purdie <>


diff --git a/bitbake/lib/bb/fetch2/ b/bitbake/lib/bb/fetch2/
index 07d722a..1c9a01c 100644
--- a/bitbake/lib/bb/fetch2/
+++ b/bitbake/lib/bb/fetch2/
@@ -188,9 +188,10 @@  class Git(FetchMethod):
         # If the repo still doesn't exist, fallback to cloning it
         if not os.path.exists(ud.clonedir):
+            # We do this since git will use a "-l" option automatically for local urls where possible
             if repourl.startswith("file://"):
                 repourl = repourl[7:]
-            clone_cmd = "%s clone -l --bare --mirror %s %s" % (ud.basecmd, repourl, ud.clonedir)
+            clone_cmd = "%s clone --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)