diff options
-rw-r--r-- | bitbake-dev/lib/bb/fetch/__init__.py | 2 | ||||
-rw-r--r-- | bitbake-dev/lib/bb/fetch/git.py | 11 | ||||
-rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/fetch/git.py | 11 |
4 files changed, 18 insertions, 8 deletions
diff --git a/bitbake-dev/lib/bb/fetch/__init__.py b/bitbake-dev/lib/bb/fetch/__init__.py index 9ca5556089..c9efe6beae 100644 --- a/bitbake-dev/lib/bb/fetch/__init__.py +++ b/bitbake-dev/lib/bb/fetch/__init__.py | |||
@@ -274,7 +274,7 @@ def runfetchcmd(cmd, d, quiet = False): | |||
274 | # rather than host provided | 274 | # rather than host provided |
275 | # Also include some other variables. | 275 | # Also include some other variables. |
276 | # FIXME: Should really include all export varaiables? | 276 | # FIXME: Should really include all export varaiables? |
277 | exportvars = ['PATH', 'GIT_PROXY_HOST', 'GIT_PROXY_PORT', 'GIT_CONFIG', 'http_proxy', 'ftp_proxy'] | 277 | exportvars = ['PATH', 'GIT_PROXY_HOST', 'GIT_PROXY_PORT', 'GIT_CONFIG', 'http_proxy', 'ftp_proxy', 'SSH_AUTH_SOCK', 'SSH_AGENT_PID'] |
278 | 278 | ||
279 | for var in exportvars: | 279 | for var in exportvars: |
280 | val = data.getVar(var, d, True) | 280 | val = data.getVar(var, d, True) |
diff --git a/bitbake-dev/lib/bb/fetch/git.py b/bitbake-dev/lib/bb/fetch/git.py index aa26a500c7..26f2b47f2a 100644 --- a/bitbake-dev/lib/bb/fetch/git.py +++ b/bitbake-dev/lib/bb/fetch/git.py | |||
@@ -66,6 +66,11 @@ class Git(Fetch): | |||
66 | bb.msg.debug(1, bb.msg.domain.Fetcher, "%s already exists (or was stashed). Skipping git checkout." % ud.localpath) | 66 | bb.msg.debug(1, bb.msg.domain.Fetcher, "%s already exists (or was stashed). Skipping git checkout." % ud.localpath) |
67 | return | 67 | return |
68 | 68 | ||
69 | if ud.user: | ||
70 | username = ud.user + '@' | ||
71 | else: | ||
72 | username = "" | ||
73 | |||
69 | gitsrcname = '%s%s' % (ud.host, ud.path.replace('/', '.')) | 74 | gitsrcname = '%s%s' % (ud.host, ud.path.replace('/', '.')) |
70 | 75 | ||
71 | repofilename = 'git_%s.tar.gz' % (gitsrcname) | 76 | repofilename = 'git_%s.tar.gz' % (gitsrcname) |
@@ -81,13 +86,13 @@ class Git(Fetch): | |||
81 | os.chdir(repodir) | 86 | os.chdir(repodir) |
82 | runfetchcmd("tar -xzf %s" % (repofile), d) | 87 | runfetchcmd("tar -xzf %s" % (repofile), d) |
83 | else: | 88 | else: |
84 | runfetchcmd("git clone -n %s://%s%s %s" % (ud.proto, ud.host, ud.path, repodir), d) | 89 | runfetchcmd("git clone -n %s://%s%s%s %s" % (ud.proto, username, ud.host, ud.path, repodir), d) |
85 | 90 | ||
86 | os.chdir(repodir) | 91 | os.chdir(repodir) |
87 | # Remove all but the .git directory | 92 | # Remove all but the .git directory |
88 | runfetchcmd("rm * -Rf", d) | 93 | runfetchcmd("rm * -Rf", d) |
89 | runfetchcmd("git fetch %s://%s%s %s" % (ud.proto, ud.host, ud.path, ud.branch), d) | 94 | runfetchcmd("git fetch %s://%s%s%s %s" % (ud.proto, username, ud.host, ud.path, ud.branch), d) |
90 | runfetchcmd("git fetch --tags %s://%s%s" % (ud.proto, ud.host, ud.path), d) | 95 | runfetchcmd("git fetch --tags %s://%s%s%s" % (ud.proto, username, ud.host, ud.path), d) |
91 | runfetchcmd("git prune-packed", d) | 96 | runfetchcmd("git prune-packed", d) |
92 | runfetchcmd("git pack-redundant --all | xargs -r rm", d) | 97 | runfetchcmd("git pack-redundant --all | xargs -r rm", d) |
93 | 98 | ||
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index 9ca5556089..c9efe6beae 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py | |||
@@ -274,7 +274,7 @@ def runfetchcmd(cmd, d, quiet = False): | |||
274 | # rather than host provided | 274 | # rather than host provided |
275 | # Also include some other variables. | 275 | # Also include some other variables. |
276 | # FIXME: Should really include all export varaiables? | 276 | # FIXME: Should really include all export varaiables? |
277 | exportvars = ['PATH', 'GIT_PROXY_HOST', 'GIT_PROXY_PORT', 'GIT_CONFIG', 'http_proxy', 'ftp_proxy'] | 277 | exportvars = ['PATH', 'GIT_PROXY_HOST', 'GIT_PROXY_PORT', 'GIT_CONFIG', 'http_proxy', 'ftp_proxy', 'SSH_AUTH_SOCK', 'SSH_AGENT_PID'] |
278 | 278 | ||
279 | for var in exportvars: | 279 | for var in exportvars: |
280 | val = data.getVar(var, d, True) | 280 | val = data.getVar(var, d, True) |
diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py index aa26a500c7..26f2b47f2a 100644 --- a/bitbake/lib/bb/fetch/git.py +++ b/bitbake/lib/bb/fetch/git.py | |||
@@ -66,6 +66,11 @@ class Git(Fetch): | |||
66 | bb.msg.debug(1, bb.msg.domain.Fetcher, "%s already exists (or was stashed). Skipping git checkout." % ud.localpath) | 66 | bb.msg.debug(1, bb.msg.domain.Fetcher, "%s already exists (or was stashed). Skipping git checkout." % ud.localpath) |
67 | return | 67 | return |
68 | 68 | ||
69 | if ud.user: | ||
70 | username = ud.user + '@' | ||
71 | else: | ||
72 | username = "" | ||
73 | |||
69 | gitsrcname = '%s%s' % (ud.host, ud.path.replace('/', '.')) | 74 | gitsrcname = '%s%s' % (ud.host, ud.path.replace('/', '.')) |
70 | 75 | ||
71 | repofilename = 'git_%s.tar.gz' % (gitsrcname) | 76 | repofilename = 'git_%s.tar.gz' % (gitsrcname) |
@@ -81,13 +86,13 @@ class Git(Fetch): | |||
81 | os.chdir(repodir) | 86 | os.chdir(repodir) |
82 | runfetchcmd("tar -xzf %s" % (repofile), d) | 87 | runfetchcmd("tar -xzf %s" % (repofile), d) |
83 | else: | 88 | else: |
84 | runfetchcmd("git clone -n %s://%s%s %s" % (ud.proto, ud.host, ud.path, repodir), d) | 89 | runfetchcmd("git clone -n %s://%s%s%s %s" % (ud.proto, username, ud.host, ud.path, repodir), d) |
85 | 90 | ||
86 | os.chdir(repodir) | 91 | os.chdir(repodir) |
87 | # Remove all but the .git directory | 92 | # Remove all but the .git directory |
88 | runfetchcmd("rm * -Rf", d) | 93 | runfetchcmd("rm * -Rf", d) |
89 | runfetchcmd("git fetch %s://%s%s %s" % (ud.proto, ud.host, ud.path, ud.branch), d) | 94 | runfetchcmd("git fetch %s://%s%s%s %s" % (ud.proto, username, ud.host, ud.path, ud.branch), d) |
90 | runfetchcmd("git fetch --tags %s://%s%s" % (ud.proto, ud.host, ud.path), d) | 95 | runfetchcmd("git fetch --tags %s://%s%s%s" % (ud.proto, username, ud.host, ud.path), d) |
91 | runfetchcmd("git prune-packed", d) | 96 | runfetchcmd("git prune-packed", d) |
92 | runfetchcmd("git pack-redundant --all | xargs -r rm", d) | 97 | runfetchcmd("git pack-redundant --all | xargs -r rm", d) |
93 | 98 | ||