All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix for git fetcher when using ssh URL with port specification
@ 2011-12-22 14:21 Juraj Hercek
  2011-12-22 14:21 ` [PATCH] fetch2/git: change colon to dot in ud.host Juraj Hercek
  0 siblings, 1 reply; 3+ messages in thread
From: Juraj Hercek @ 2011-12-22 14:21 UTC (permalink / raw)
  To: Bitbake Devel

Hello,

bitbake failed to build a package which uses git fetcher to fetch repository
from ssh URL which contains also port specification. The patch in following
email fixes this issue.

Cheers,
Juraj

Juraj Hercek (1):
  fetch2/git: change colon to dot in ud.host

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

-- 
1.7.2.5




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] fetch2/git: change colon to dot in ud.host
  2011-12-22 14:21 [PATCH] Fix for git fetcher when using ssh URL with port specification Juraj Hercek
@ 2011-12-22 14:21 ` Juraj Hercek
  2012-01-04 14:19   ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Juraj Hercek @ 2011-12-22 14:21 UTC (permalink / raw)
  To: Bitbake Devel

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>
---
 lib/bb/fetch2/git.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index f203c5a..d833714 100644
--- a/lib/bb/fetch2/git.py
+++ b/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
-- 
1.7.2.5




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fetch2/git: change colon to dot in ud.host
  2011-12-22 14:21 ` [PATCH] fetch2/git: change colon to dot in ud.host Juraj Hercek
@ 2012-01-04 14:19   ` Richard Purdie
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2012-01-04 14:19 UTC (permalink / raw)
  To: Juraj Hercek; +Cc: Bitbake Devel

On Thu, 2011-12-22 at 15:21 +0100, Juraj Hercek wrote:
> 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>
> ---
>  lib/bb/fetch2/git.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Merged to master, thanks.

Richard




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-04 14:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-22 14:21 [PATCH] Fix for git fetcher when using ssh URL with port specification Juraj Hercek
2011-12-22 14:21 ` [PATCH] fetch2/git: change colon to dot in ud.host Juraj Hercek
2012-01-04 14:19   ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.