summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2007-11-08 09:47:39 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2007-11-08 09:47:39 +0000
commite843427c801f7ce51e970f07cee259de982f8d76 (patch)
tree96a562b236a8b85c1cee5bd3891877616c92ef4b
parent5f09c666d1050a1140f1adb7c2da8593a706995c (diff)
downloadbitbake-contrib-e843427c801f7ce51e970f07cee259de982f8d76.tar.gz
git.py: Use git-fetch instead of git-pull removing any need for merges when fetching (we don't care about the index). Fixes fetch errors. Add BB_GENERATE_MIRROR_TARBALLS option, set to 0 to make git fetches faster at the expense of not creating mirror tarballs. (from poky)
-rw-r--r--ChangeLog4
-rw-r--r--lib/bb/fetch/git.py10
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c0d3919d..d42248a72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -73,6 +73,10 @@ Changes in Bitbake 1.9.x:
- Fix unexport handling (#3135)
- Add bb.copyfile function similar to bb.movefile (and improve movefile error reporting)
- Allow multiple options for deptask flag
+ - Use git-fetch instead of git-pull removing any need for merges when
+ fetching (we don't care about the index). Fixes fetch errors.
+ - Add BB_GENERATE_MIRROR_TARBALLS option, set to 0 to make git fetches
+ faster at the expense of not creating mirror tarballs.
Changes in Bitbake 1.8.0:
- Release 1.7.x as a stable series
diff --git a/lib/bb/fetch/git.py b/lib/bb/fetch/git.py
index 0b04840bf..89b0be3d1 100644
--- a/lib/bb/fetch/git.py
+++ b/lib/bb/fetch/git.py
@@ -89,16 +89,16 @@ class Git(Fetch):
os.chdir(repodir)
# Remove all but the .git directory
runfetchcmd("rm * -Rf", d)
- runfetchcmd("git pull %s://%s%s" % (ud.proto, ud.host, ud.path), d)
+ runfetchcmd("git fetch %s://%s%s" % (ud.proto, ud.host, ud.path), d)
runfetchcmd("git pull --tags %s://%s%s" % (ud.proto, ud.host, ud.path), d)
runfetchcmd("git prune-packed", d)
runfetchcmd("git pack-redundant --all | xargs -r rm", d)
- # old method of downloading tags
- #runfetchcmd("rsync -a --verbose --stats --progress rsync://%s%s/ %s" % (ud.host, ud.path, os.path.join(repodir, ".git", "")), d)
os.chdir(repodir)
- bb.msg.note(1, bb.msg.domain.Fetcher, "Creating tarball of git repository")
- runfetchcmd("tar -czf %s %s" % (repofile, os.path.join(".", ".git", "*") ), d)
+ mirror_tarballs = data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True)
+ if mirror_tarballs != "0":
+ bb.msg.note(1, bb.msg.domain.Fetcher, "Creating tarball of git repository")
+ runfetchcmd("tar -czf %s %s" % (repofile, os.path.join(".", ".git", "*") ), d)
if os.path.exists(codir):
prunedir(codir)