mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
c58c94824b
commit
afe85485fe
@@ -81,12 +81,17 @@ def getBuildEnvironmentController(**kwargs):
|
||||
raise Exception("FIXME: Implement BEC for type %s" % str(be.betype))
|
||||
|
||||
|
||||
def _getgitcheckoutdirectoryname(url):
|
||||
def _get_git_clonedirectory(url, branch):
|
||||
""" Utility that returns the last component of a git path as directory
|
||||
"""
|
||||
import re
|
||||
components = re.split(r'[:\.\/]', url)
|
||||
return components[-2] if components[-1] == "git" else components[-1]
|
||||
base = components[-2] if components[-1] == "git" else components[-1]
|
||||
|
||||
if branch != "HEAD":
|
||||
return "_%s_%s.toaster_cloned" % (base, branch)
|
||||
|
||||
return base
|
||||
|
||||
|
||||
class BuildEnvironmentController(object):
|
||||
@@ -166,12 +171,12 @@ class BuildEnvironmentController(object):
|
||||
raise Exception("Must override setLayers")
|
||||
|
||||
|
||||
def getBBController(self, brbe):
|
||||
def getBBController(self):
|
||||
""" returns a BitbakeController to an already started server; this is the point where the server
|
||||
starts if needed; or reconnects to the server if we can
|
||||
"""
|
||||
if not self.connection:
|
||||
self.startBBServer(brbe)
|
||||
self.startBBServer()
|
||||
self.be.lock = BuildEnvironment.LOCK_RUNNING
|
||||
self.be.save()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user