summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-26 11:20:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-27 01:27:55 +0100
commitc7c58dbe42723dc6327e1867d71d63d120305e73 (patch)
treea6cd380ad07735d5264c5d96a14cb80d3dcdc318 /bitbake/lib/bb/fetch2/git.py
parent20e439e22017b1eb9767b57d181ae1855cecf77c (diff)
downloadpoky-c7c58dbe42723dc6327e1867d71d63d120305e73.tar.gz
bitbake: fetch2/git: Stop git from triggering fsync() calls
We only ever clone other repositories, if there were a problem such as power failure, we'd blow away data and rebuild. As such we don't need fsync(). With filesystems like ext*, the fsync pushes nearly all the data out to disk which impacts all running processes. We therefore set a configuration parameter to disable the fsync() calls. Also fixup a case where basecmd wasn't being used for no good reason. (Bitbake rev: 0a26abaf3a1e34d556c9375068dd17c879568d0f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r--bitbake/lib/bb/fetch2/git.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 9ca24428a1..799fb6c0fe 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -123,7 +123,7 @@ class Git(FetchMethod):
123 ud.branches[name] = branch 123 ud.branches[name] = branch
124 ud.unresolvedrev[name] = branch 124 ud.unresolvedrev[name] = branch
125 125
126 ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git" 126 ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git -c core.fsyncobjectfiles=0"
127 127
128 ud.write_tarballs = ((data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True) or "0") != "0") or ud.rebaseable 128 ud.write_tarballs = ((data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True) or "0") != "0") or ud.rebaseable
129 129
@@ -275,7 +275,7 @@ class Git(FetchMethod):
275 os.symlink(ud.clonedir, indirectiondir) 275 os.symlink(ud.clonedir, indirectiondir)
276 clonedir = indirectiondir 276 clonedir = indirectiondir
277 277
278 runfetchcmd("git clone %s %s/ %s" % (cloneflags, clonedir, destdir), d) 278 runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, cloneflags, clonedir, destdir), d)
279 if not ud.nocheckout: 279 if not ud.nocheckout:
280 os.chdir(destdir) 280 os.chdir(destdir)
281 if subdir != "": 281 if subdir != "":