[yocto] [AUTOBUILDER][PATCH 4/4] yoctogit.py: set workdirs in _fetch and _fullClone
Elizabeth Flanagan
elizabeth.flanagan at intel.com
Mon Mar 10 15:54:02 PDT 2014
We use _fetch and _fullClone differently than initially intended.
If you trace through the code, there are around 6 entry points
for both and workdir needs to be set specifically for our use
cases.
One case where we use fetch is doing a fetch in our source dir,
prior to us copying it over into our builddir. So,
if we are doing a copy build, we fetch first in source and then
copy (same with clone).
Otherwise, we just default out to the old fetch/fullClone behavior.
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan at intel.com>
---
.../buildbot/steps/source/yoctogit.py | 19 +++++++++++++++++++
1 file changed, 19 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 080f5b2..a21d22a 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
@@ -428,6 +428,15 @@ class YoctoGit(Source):
return d
def _fetch(self, _):
+ if "copy" in self.method:
+ self.workdir='source/'+self.repourl
+ else:
+ if "poky" in self.layername or \
+ "oecore" in self.layername or \
+ "eclipse" in self.layername:
+ self.workdir = "build"
+ else:
+ self.workdir = 'build/'+self.layername
command = ['fetch', '-t', '--prune', self.repourl, '+refs/heads/' + self.branch + ':refs/remotes/' + self.branch]
# If the 'progress' option is set, tell git fetch to output
# progress information to the log. This can solve issues with
@@ -483,6 +492,16 @@ class YoctoGit(Source):
"""Perform full clone and checkout to the revision if specified
In the case of shallow clones if any of the step fail abort whole build step.
"""
+ if "copy" in self.method:
+ self.workdir='source/'+self.repourl
+ else:
+ if "poky" in self.layername or \
+ "oecore" in self.layername or \
+ "eclipse" in self.layername:
+ self.workdir = "build"
+ else:
+ self.workdir = 'build/'+self.layername
+
args = []
if self.branch != 'HEAD':
args += ['--branch', self.branch]
--
1.8.1.2
More information about the yocto
mailing list