summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldcontrol/bbcontroller.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-01-28 13:18:09 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-30 15:14:58 +0000
commitafe85485fe185b663a1285b5c27de3160bf06cf7 (patch)
tree487cdf0fbbd11353094c1f68bc1034b3390dd7e6 /bitbake/lib/toaster/bldcontrol/bbcontroller.py
parentc58c94824b29665f52ae67ceae3f096930c89fe5 (diff)
downloadpoky-afe85485fe185b663a1285b5c27de3160bf06cf7.tar.gz
bitbake: toaster: new layer checkout logic
This patch implements a new layer checkout logic that brings more flexibility in getting layers under different commits work with Toaster. The new hibrid logic will checkout separately each layer and commit id; the task execution will be delegated to the checkedout bitbake, but the data logger will be executed from the current toaster version as to bring in enough data to sustain the updates in UI models. [YOCTO #7171] [YOCTO #6892] (Bitbake rev: c6eb0f7f16c59530c2525b2e5629fe86de4e8f0f) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/bbcontroller.py')
-rw-r--r--bitbake/lib/toaster/bldcontrol/bbcontroller.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/bbcontroller.py b/bitbake/lib/toaster/bldcontrol/bbcontroller.py
index 102606e929..dbfb2f3a04 100644
--- a/bitbake/lib/toaster/bldcontrol/bbcontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/bbcontroller.py
@@ -81,12 +81,17 @@ def getBuildEnvironmentController(**kwargs):
81 raise Exception("FIXME: Implement BEC for type %s" % str(be.betype)) 81 raise Exception("FIXME: Implement BEC for type %s" % str(be.betype))
82 82
83 83
84def _getgitcheckoutdirectoryname(url): 84def _get_git_clonedirectory(url, branch):
85 """ Utility that returns the last component of a git path as directory 85 """ Utility that returns the last component of a git path as directory
86 """ 86 """
87 import re 87 import re
88 components = re.split(r'[:\.\/]', url) 88 components = re.split(r'[:\.\/]', url)
89 return components[-2] if components[-1] == "git" else components[-1] 89 base = components[-2] if components[-1] == "git" else components[-1]
90
91 if branch != "HEAD":
92 return "_%s_%s.toaster_cloned" % (base, branch)
93
94 return base
90 95
91 96
92class BuildEnvironmentController(object): 97class BuildEnvironmentController(object):
@@ -166,12 +171,12 @@ class BuildEnvironmentController(object):
166 raise Exception("Must override setLayers") 171 raise Exception("Must override setLayers")
167 172
168 173
169 def getBBController(self, brbe): 174 def getBBController(self):
170 """ returns a BitbakeController to an already started server; this is the point where the server 175 """ returns a BitbakeController to an already started server; this is the point where the server
171 starts if needed; or reconnects to the server if we can 176 starts if needed; or reconnects to the server if we can
172 """ 177 """
173 if not self.connection: 178 if not self.connection:
174 self.startBBServer(brbe) 179 self.startBBServer()
175 self.be.lock = BuildEnvironment.LOCK_RUNNING 180 self.be.lock = BuildEnvironment.LOCK_RUNNING
176 self.be.save() 181 self.be.save()
177 182