fetch2/git: change colon to dot in ud.host
authorJuraj Hercek <juraj.hercek@jhksoftware.com>
Thu, 22 Dec 2011 14:21:12 +0000 (15:21 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Jan 2012 14:19:17 +0000 (14:19 +0000)
commit1f2867b79f1cd2bfbdc849ba5677a39db6fa3396
treeca49a92e1a3d9ff719d6b0725b704df0dc71834e
parenta228f0a32c2c14d62effbbba5f4fada4cd3817f6
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".

Signed-off-by: Juraj Hercek <juraj.hercek@jhksoftware.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/fetch2/git.py