From 51d64452f65e247321691243be304e92c19d3339 Mon Sep 17 00:00:00 2001 From: Juraj Hercek Date: Thu, 22 Dec 2011 15:21:12 +0100 Subject: [PATCH] fetch2/git: change colon to dot in ud.host 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/host:port.path.to.repo.git". However, when clonging from ${DL_DIR}/git2/host:port.path.to.repo.git 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: "host.port.path.to.repo.git". (Bitbake rev: 1f2867b79f1cd2bfbdc849ba5677a39db6fa3396) Signed-off-by: Juraj Hercek Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index f203c5abb1..d8337149b1 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -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.host, ud.path.replace('/', '.')) + gitsrcname = '%s%s' % (ud.host.replace(':','.'), 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