From c7c58dbe42723dc6327e1867d71d63d120305e73 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 26 Apr 2014 11:20:04 +0100 Subject: 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 --- bitbake/lib/bb/fetch2/git.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb/fetch2/git.py') 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): ud.branches[name] = branch ud.unresolvedrev[name] = branch - ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git" + ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git -c core.fsyncobjectfiles=0" ud.write_tarballs = ((data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True) or "0") != "0") or ud.rebaseable @@ -275,7 +275,7 @@ class Git(FetchMethod): os.symlink(ud.clonedir, indirectiondir) clonedir = indirectiondir - runfetchcmd("git clone %s %s/ %s" % (cloneflags, clonedir, destdir), d) + runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, cloneflags, clonedir, destdir), d) if not ud.nocheckout: os.chdir(destdir) if subdir != "": -- cgit v1.2.3-54-g00ecf