summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-12-11 17:11:32 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-12-11 17:12:53 +0000
commitb80f6d8ac4f7f76c2a2f1450616a963ca4e6deba (patch)
tree89c4cdde70be0fb201317445b29ca95c2fb8ee86 /bitbake/lib
parenta94737f61117ef356094906e4333b056ed48d265 (diff)
downloadpoky-b80f6d8ac4f7f76c2a2f1450616a963ca4e6deba.tar.gz
bitbake/git.py: Add support for fullclone parameter
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib')
-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