diff options
Diffstat (limited to 'lib/python2.7/site-packages/autobuilder/buildsteps/CheckOutLayers.py')
-rw-r--r-- | lib/python2.7/site-packages/autobuilder/buildsteps/CheckOutLayers.py | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/CheckOutLayers.py b/lib/python2.7/site-packages/autobuilder/buildsteps/CheckOutLayers.py deleted file mode 100644 index b3278625..00000000 --- a/lib/python2.7/site-packages/autobuilder/buildsteps/CheckOutLayers.py +++ /dev/null @@ -1,119 +0,0 @@ -# This file is part of Buildbot. Buildbot is free software: you can -# redistribute it and/or modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation, version 2. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 51 -# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Copyright Buildbot Team Members -# -# -''' -Created on Jan 14, 2012 - -__copyright__ = "Copyright Buildbot Team Members" -__credits__ = ["Elizabeth Flanagan"] -__license__ = "GPL" -__version__ = "2.0" -__maintainer__ = "Elizabeth Flanagan" -__email__ = "pidge@toganlabs.com" -''' -from twisted.python import log -from twisted.internet import defer - -import os -from buildbot.steps.source.yoctogit import YoctoGit -from buildbot import config -from buildbot.status import build -from buildbot.process import buildstep - -class CheckOutLayers(YoctoGit): - def __init__(self, factory, scheduler=None, layername=None, mode='full', storedir=None, mirrordir=None, - method='clobber', submodules=False, shallow=False, workdir='build', - timeout=100000, progress=True, retryFetch=True, clobberOnFailure=False, - getDescription=True, argdict=None, - **kwargs): - self.scheduler = scheduler - self.workdir=workdir - self.branch = "" - self.commit = "" - self.method = method - self.prog = progress - self.repourl = "" - self.retryFetch = retryFetch - self.submodules = submodules - self.shallow = shallow - self.storedir=storedir - self.mirrordir=mirrordir - self.fetchcount = 0 - self.clobberOnFailure = clobberOnFailure - self.mode = mode - self.timeout = 100000 - self.getDescription = getDescription - self.layername = layername - self.name="Git checkout of " + layername - kwargs['timeout']=self.timeout - for k, v in argdict.iteritems(): - setattr(self, k, v) - YoctoGit.__init__(self, repourl=self.repourl, branch=self.branch, mode=self.mode, - method=self.method, storedir=self.storedir, mirrordir=mirrordir, submodules=self.submodules, - workdir=self.workdir, shallow=self.shallow, progress=self.progress, - retryFetch=self.retryFetch, clobberOnFailure=self.clobberOnFailure, - getDescription=self.getDescription, layername=self.layername, **kwargs) - - def startVC(self, branch, revision, patch): - if self.getProperty('branch_'+self.layername): - self.branch = self.getProperty('branch_'+self.layername) - else: - self.branch = "master" - if self.getProperty('repo_'+self.layername): - self.repourl = self.getProperty('repo_'+self.layername) - else: - self.repourl = "git://git.yoctoproject.org/poky" - - if self.getProperty('commit_'+self.layername) == "HEAD" and \ - self.getProperty('commit_resolvedhead_'+self.layername) is not None: - log.msg("Using Resolved HEAD") - self.commit = self.getProperty('commit_resolvedhead_'+self.layername) - elif self.getProperty('commit_'+self.layername): - self.commit = self.getProperty('commit_'+self.layername) - else: - self.commit = "HEAD" - - self.setProperty('repourl_' + self.layername, self.repourl, "CheckOutLayers") - self.setProperty('branch_' + self.layername, self.branch, "CheckOutLayers") - self.setProperty('commit_' + self.layername, self.commit, "CheckOutLayers") - - # Store non-core (and non-eclipse) layer names in a variable for use - # by other buildsteps - if self.layername not in ["poky", "oecore", "eclipse", "bitbake"]: - layers = self.getProperty('cloned_layers', default='') - if len(layers) == 0: - layers = self.layername - else: - layers = layers + ' ' + self.layername - self.setProperty("cloned_layers", layers, "CheckOutLayers") - - if self.layername == "poky" or self.layername == "oecore" or "eclipse" in self.layername: - self.setProperty('repository', self.repourl, "CheckOutLayers") - self.setProperty('branch', self.branch, "CheckOutLayers") - self.setProperty('revision', self.commit, "CheckOutLayers") - YoctoGit.startVC(self, branch=self.branch, patch=None, revision=self.commit) - - @defer.inlineCallbacks - def parseGotRevision(self, _=None): - self.workdir = "source/" + self.repourl - stdout = yield self._dovccmd(['rev-parse', self.commit], collectStdout=True) - revision = stdout.strip() - if len(revision) != 40: - raise buildstep.BuildStepFailed() - if self.layername == "poky": - self.updateSourceProperty('got_revision', revision) - self.updateSourceProperty('got_revision_' + self.layername, revision) - defer.returnValue(0) |