[yocto] [AB PATCH 15/22] yoctogit.py: Set workdir for the class
Elizabeth Flanagan
elizabeth.flanagan at intel.com
Wed Mar 19 13:51:13 PDT 2014
From: Beth Flanagan <elizabeth.flanagan at intel.com>
Stop utilizing resetWorkdir, it just confuses things and is really
not needed.
Just set self.workdir for the class. This ignores the self.workdir passed
in (which I intend on removing soon.)
Signed-off-by: Beth Flanagan <elizabeth.flanagan at intel.com>
---
.../buildbot/steps/source/yoctogit.py | 31 ++++------------------
1 file changed, 5 insertions(+), 26 deletions(-)
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 98a2fba..c739d7d 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
@@ -146,6 +146,11 @@ class YoctoGit(Source):
self.srcdir = 'build/'+self.layername
else:
self.srcdir = 'source'
+ if self.method in ['barecopy', 'movecopy']:
+ self.workdir='source/'+self.repourl
+ else:
+ self.workdir = 'build'
+
Source.__init__(self, **kwargs)
if self.mode not in ['incremental', 'full']:
@@ -261,14 +266,6 @@ class YoctoGit(Source):
log.msg("Source step failed while running command %s" % cmd)
raise buildstep.BuildStepFailed()
d.addCallback(lambda _: evaluateCommand(cmd))
- if "poky" in self.layername or \
- "oecore" in self.layername or \
- "eclipse" in self.layername:
- todir = "build"
- self.workdir = 'source/'+self.repourl
- else:
- todir = "build/" + self.layername
- self.workdir = 'source/'+self.repourl
d.addCallback(lambda _: self.incremental())
return d
@@ -296,12 +293,6 @@ class YoctoGit(Source):
log.msg("Source step failed while running command %s" % cmd)
raise buildstep.BuildStepFailed()
d.addCallback(lambda _: evaluateCommand(cmd))
- if "poky" in self.layername or \
- "oecore" in self.layername or \
- "eclipse" in self.layername:
- todir = "build"
- else:
- todir = "build/" + self.layername
d.addCallback(lambda _: self.incremental())
return d
@@ -329,21 +320,9 @@ class YoctoGit(Source):
if cmd.didFail():
log.msg("Source step failed while running command %s" % cmd)
raise buildstep.BuildStepFailed()
-
d.addCallback(lambda _: evaluateCommand(cmd))
return d
- def resetWorkdir(_):
- if "poky" in self.layername or \
- "oecore" in self.layername or \
- "eclipse" in self.layername:
- self.workdir = 'build.'
- else:
- self.workdir = "build/" + self.layername
- return 0
- d.addCallback(resetWorkdir)
- return d
-
def finish(self, res):
d = defer.succeed(res)
def _gotResults(results):
--
1.8.1.2
More information about the yocto
mailing list