diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index e8ad3b43ca..58ed1f4108 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -41,8 +41,11 @@ class Git(Fetch): | |||
41 | """ | 41 | """ |
42 | return ud.type in ['git'] | 42 | return ud.type in ['git'] |
43 | 43 | ||
44 | def localpath(self, url, ud, d): | 44 | def urldata_init(self, ud, d): |
45 | 45 | """ | |
46 | init git specific variable within url data | ||
47 | so that the git method like latest_revision() can work | ||
48 | """ | ||
46 | if 'protocol' in ud.parm: | 49 | if 'protocol' in ud.parm: |
47 | ud.proto = ud.parm['protocol'] | 50 | ud.proto = ud.parm['protocol'] |
48 | elif not ud.host: | 51 | elif not ud.host: |
@@ -56,6 +59,10 @@ class Git(Fetch): | |||
56 | ud.mirrortarball = 'git_%s.tar.gz' % (gitsrcname) | 59 | ud.mirrortarball = 'git_%s.tar.gz' % (gitsrcname) |
57 | ud.clonedir = os.path.join(data.expand('${GITDIR}', d), gitsrcname) | 60 | ud.clonedir = os.path.join(data.expand('${GITDIR}', d), gitsrcname) |
58 | 61 | ||
62 | ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git" | ||
63 | |||
64 | def localpath(self, url, ud, d): | ||
65 | |||
59 | tag = Fetch.srcrev_internal_helper(ud, d) | 66 | tag = Fetch.srcrev_internal_helper(ud, d) |
60 | if tag is True: | 67 | if tag is True: |
61 | ud.tag = self.latest_revision(url, ud, d) | 68 | ud.tag = self.latest_revision(url, ud, d) |
@@ -78,8 +85,6 @@ class Git(Fetch): | |||
78 | else: | 85 | else: |
79 | ud.localfile = data.expand('git_%s%s_%s.tar.gz' % (ud.host, subdirpath.replace('/', '.'), ud.tag), d) | 86 | ud.localfile = data.expand('git_%s%s_%s.tar.gz' % (ud.host, subdirpath.replace('/', '.'), ud.tag), d) |
80 | 87 | ||
81 | ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git" | ||
82 | |||
83 | if 'noclone' in ud.parm: | 88 | if 'noclone' in ud.parm: |
84 | ud.localfile = None | 89 | ud.localfile = None |
85 | return None | 90 | return None |