diff options
| -rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index bbd302ee78..e1e876535f 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
| @@ -205,7 +205,7 @@ class Git(FetchMethod): | |||
| 205 | if ud.rebaseable: | 205 | if ud.rebaseable: |
| 206 | for name in ud.names: | 206 | for name in ud.names: |
| 207 | gitsrcname = gitsrcname + '_' + ud.revisions[name] | 207 | gitsrcname = gitsrcname + '_' + ud.revisions[name] |
| 208 | ud.mirrortarball = 'git2_%s.tar.gz' % (gitsrcname) | 208 | ud.mirrortarball = 'git2_%s.tar.gz' % gitsrcname |
| 209 | ud.fullmirror = os.path.join(d.getVar("DL_DIR"), ud.mirrortarball) | 209 | ud.fullmirror = os.path.join(d.getVar("DL_DIR"), ud.mirrortarball) |
| 210 | gitdir = d.getVar("GITDIR") or (d.getVar("DL_DIR") + "/git2/") | 210 | gitdir = d.getVar("GITDIR") or (d.getVar("DL_DIR") + "/git2/") |
| 211 | ud.clonedir = os.path.join(gitdir, gitsrcname) | 211 | ud.clonedir = os.path.join(gitdir, gitsrcname) |
| @@ -240,7 +240,7 @@ class Git(FetchMethod): | |||
| 240 | # If the checkout doesn't exist and the mirror tarball does, extract it | 240 | # If the checkout doesn't exist and the mirror tarball does, extract it |
| 241 | if not os.path.exists(ud.clonedir) and os.path.exists(ud.fullmirror): | 241 | if not os.path.exists(ud.clonedir) and os.path.exists(ud.fullmirror): |
| 242 | bb.utils.mkdirhier(ud.clonedir) | 242 | bb.utils.mkdirhier(ud.clonedir) |
| 243 | runfetchcmd("tar -xzf %s" % (ud.fullmirror), d, workdir=ud.clonedir) | 243 | runfetchcmd("tar -xzf %s" % ud.fullmirror, d, workdir=ud.clonedir) |
| 244 | 244 | ||
| 245 | repourl = self._get_repo_url(ud) | 245 | repourl = self._get_repo_url(ud) |
| 246 | 246 | ||
| @@ -292,14 +292,14 @@ class Git(FetchMethod): | |||
| 292 | 292 | ||
| 293 | logger.info("Creating tarball of git repository") | 293 | logger.info("Creating tarball of git repository") |
| 294 | runfetchcmd("tar -czf %s %s" % (ud.fullmirror, os.path.join(".") ), d, workdir=ud.clonedir) | 294 | runfetchcmd("tar -czf %s %s" % (ud.fullmirror, os.path.join(".") ), d, workdir=ud.clonedir) |
| 295 | runfetchcmd("touch %s.done" % (ud.fullmirror), d, workdir=ud.clonedir) | 295 | runfetchcmd("touch %s.done" % ud.fullmirror, d, workdir=ud.clonedir) |
| 296 | 296 | ||
| 297 | def unpack(self, ud, destdir, d): | 297 | def unpack(self, ud, destdir, d): |
| 298 | """ unpack the downloaded src to destdir""" | 298 | """ unpack the downloaded src to destdir""" |
| 299 | 299 | ||
| 300 | subdir = ud.parm.get("subpath", "") | 300 | subdir = ud.parm.get("subpath", "") |
| 301 | if subdir != "": | 301 | if subdir != "": |
| 302 | readpathspec = ":%s" % (subdir) | 302 | readpathspec = ":%s" % subdir |
| 303 | def_destsuffix = "%s/" % os.path.basename(subdir.rstrip('/')) | 303 | def_destsuffix = "%s/" % os.path.basename(subdir.rstrip('/')) |
| 304 | else: | 304 | else: |
| 305 | readpathspec = "" | 305 | readpathspec = "" |
| @@ -469,7 +469,7 @@ class Git(FetchMethod): | |||
| 469 | if not os.path.exists(rev_file) or not os.path.getsize(rev_file): | 469 | if not os.path.exists(rev_file) or not os.path.getsize(rev_file): |
| 470 | from pipes import quote | 470 | from pipes import quote |
| 471 | commits = bb.fetch2.runfetchcmd( | 471 | commits = bb.fetch2.runfetchcmd( |
| 472 | "git rev-list %s -- | wc -l" % (quote(rev)), | 472 | "git rev-list %s -- | wc -l" % quote(rev), |
| 473 | d, quiet=True).strip().lstrip('0') | 473 | d, quiet=True).strip().lstrip('0') |
| 474 | if commits: | 474 | if commits: |
| 475 | open(rev_file, "w").write("%d\n" % int(commits)) | 475 | open(rev_file, "w").write("%d\n" % int(commits)) |
