mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
bitbake/git.py: Add support for fullclone parameter
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
@@ -58,7 +58,10 @@ class Git(Fetch):
|
|||||||
if not ud.tag or ud.tag == "master":
|
if not ud.tag or ud.tag == "master":
|
||||||
ud.tag = self.latest_revision(url, ud, d)
|
ud.tag = self.latest_revision(url, ud, d)
|
||||||
|
|
||||||
ud.localfile = data.expand('git_%s%s_%s.tar.gz' % (ud.host, ud.path.replace('/', '.'), ud.tag), d)
|
if 'fullclone' in ud.parm:
|
||||||
|
ud.localfile = ud.mirrortarball
|
||||||
|
else:
|
||||||
|
ud.localfile = data.expand('git_%s%s_%s.tar.gz' % (ud.host, ud.path.replace('/', '.'), ud.tag), d)
|
||||||
|
|
||||||
return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
|
return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
|
||||||
|
|
||||||
@@ -98,10 +101,13 @@ class Git(Fetch):
|
|||||||
|
|
||||||
os.chdir(ud.clonedir)
|
os.chdir(ud.clonedir)
|
||||||
mirror_tarballs = data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True)
|
mirror_tarballs = data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True)
|
||||||
if mirror_tarballs != "0":
|
if mirror_tarballs != "0" or 'fullclone' in ud.parm:
|
||||||
bb.msg.note(1, bb.msg.domain.Fetcher, "Creating tarball of git repository")
|
bb.msg.note(1, bb.msg.domain.Fetcher, "Creating tarball of git repository")
|
||||||
runfetchcmd("tar -czf %s %s" % (repofile, os.path.join(".", ".git", "*") ), d)
|
runfetchcmd("tar -czf %s %s" % (repofile, os.path.join(".", ".git", "*") ), d)
|
||||||
|
|
||||||
|
if 'fullclone' in ud.parm:
|
||||||
|
return
|
||||||
|
|
||||||
if os.path.exists(codir):
|
if os.path.exists(codir):
|
||||||
bb.utils.prunedir(codir)
|
bb.utils.prunedir(codir)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user