[yocto] [AB PATCH 22/22] yoctogit.py: sync on mv
Elizabeth Flanagan
elizabeth.flanagan at intel.com
Wed Mar 19 13:51:20 PDT 2014
From: Beth Flanagan <elizabeth.flanagan at intel.com>
On systems with very high load sometimes the system still thinks the
build dir is there. I've only seen this once, but a sync here ensures
that the system knows that build has been moved.
Signed-off-by: Beth Flanagan <elizabeth.flanagan at intel.com>
---
.../buildbot/steps/source/yoctogit.py | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/steps/source/yoctogit.py b/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/steps/source/yoctogit.py
index 4e1a334..c6b8258 100644
--- a/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/steps/source/yoctogit.py
+++ b/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/steps/source/yoctogit.py
@@ -204,6 +204,7 @@ class YoctoGit(Source):
return
elif self.method == 'movecopy':
yield self.movecopy()
+ yield self._sync()
yield self._srccopy()
return
@@ -269,6 +270,23 @@ class YoctoGit(Source):
d.addCallback(lambda _: self.incremental())
return d
+ def _sync(self):
+ cmd = buildstep.RemoteShellCommand(self.workdir,
+ 'sync',
+ env=self.env,
+ logEnviron=self.logEnviron,
+ timeout=self.timeout)
+ cmd.useLog(self.stdio_log, False)
+ log.msg("syncing filesystem")
+ d = self.runCommand(cmd)
+ def evaluateCommand(cmd):
+ if cmd.didFail():
+ log.msg("Source step failed while running command %s" % cmd)
+ raise buildstep.BuildStepFailed()
+ d.addCallback(lambda _: evaluateCommand(cmd))
+ return d
+
+
def movecopy(self):
# This relies on an external method of cleaning up the todir, like a cron job
# it can be rather disk space intensive.
--
1.8.1.2
More information about the yocto
mailing list