Patchwork [bitbake-devel] Juraj Hercek : fetch2/git: change colon to dot in

mail settings
Date Jan. 4, 2012, 2:27 p.m.
Message ID <20120104142702.5445D10331@opal>
Download mbox | patch
Permalink /patch/18297/
State Not Applicable
Headers show

Comments - Jan. 4, 2012, 2:27 p.m.
Module: bitbake.git
Branch: master
Commit: 1f2867b79f1cd2bfbdc849ba5677a39db6fa3396

Author: Juraj Hercek <>
Date:   Thu Dec 22 15:21:12 2011 +0100

fetch2/git: change colon to dot in

Local cloning of git repositories from DL_DIR into WORKDIR fails when
using ssh URL with port specification e.g.
"ssh://user@host:port/path/to/repo.git". Git fetcher clones such remote
repository into "${DL_DIR}/git2/". However,
when clonging from ${DL_DIR}/git2/ into
${WORKDIR}, git fetcher fails with "ssh: Could not resolve hostname
${DLDIR}/git2/host: Name or service not known".

A solution is to replace ":" by "." in host component, similarly as it
is done when replacing "/" with "." in path component, so that local
clone directory in DL_DIR looks like this: "".

Signed-off-by: Juraj Hercek <>
Signed-off-by: Richard Purdie <>


 lib/bb/fetch2/ |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/lib/bb/fetch2/ b/lib/bb/fetch2/
index f203c5a..d833714 100644
--- a/lib/bb/fetch2/
+++ b/lib/bb/fetch2/
@@ -115,7 +115,7 @@  class Git(FetchMethod):
                 ud.branches[name] = ud.revisions[name]
                 ud.revisions[name] = self.latest_revision(ud.url, ud, d, name)
-        gitsrcname = '%s%s' % (, ud.path.replace('/', '.'))
+        gitsrcname = '%s%s' % (':','.'), ud.path.replace('/', '.'))
         # for rebaseable git repo, it is necessary to keep mirror tar ball
         # per revision, so that even the revision disappears from the
         # upstream repo in the future, the mirror will remain intact and still