summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch/git.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py
index 5e7cf985f8..79ca1a2663 100644
--- a/bitbake/lib/bb/fetch/git.py
+++ b/bitbake/lib/bb/fetch/git.py
@@ -58,7 +58,10 @@ class Git(Fetch):
58 if not ud.tag or ud.tag == "master": 58 if not ud.tag or ud.tag == "master":
59 ud.tag = self.latest_revision(url, ud, d) 59 ud.tag = self.latest_revision(url, ud, d)
60 60
61 ud.localfile = data.expand('git_%s%s_%s.tar.gz' % (ud.host, ud.path.replace('/', '.'), ud.tag), d) 61 if 'fullclone' in ud.parm:
62 ud.localfile = ud.mirrortarball
63 else:
64 ud.localfile = data.expand('git_%s%s_%s.tar.gz' % (ud.host, ud.path.replace('/', '.'), ud.tag), d)
62 65
63 return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile) 66 return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
64 67
@@ -98,10 +101,13 @@ class Git(Fetch):
98 101
99 os.chdir(ud.clonedir) 102 os.chdir(ud.clonedir)
100 mirror_tarballs = data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True) 103 mirror_tarballs = data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True)
101 if mirror_tarballs != "0": 104 if mirror_tarballs != "0" or 'fullclone' in ud.parm:
102 bb.msg.note(1, bb.msg.domain.Fetcher, "Creating tarball of git repository") 105 bb.msg.note(1, bb.msg.domain.Fetcher, "Creating tarball of git repository")
103 runfetchcmd("tar -czf %s %s" % (repofile, os.path.join(".", ".git", "*") ), d) 106 runfetchcmd("tar -czf %s %s" % (repofile, os.path.join(".", ".git", "*") ), d)
104 107
108 if 'fullclone' in ud.parm:
109 return
110
105 if os.path.exists(codir): 111 if os.path.exists(codir):
106 bb.utils.prunedir(codir) 112 bb.utils.prunedir(codir)
107 113