mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03:49:32 +02:00
bitbake: toaster: add fields for sourcedir and builddir paths
We add explicit absolute paths for a directory where the layer sources will be checked out (sourcedir) and where the build activities will take place. Adding minimal checking when starting the application in order to make sure that BuildEnvironment (BE) settings are usable. This check is ran by the toaster script at startup. Modify the localhost bbcontroller to use the BE settings instead of trying to self-configure on checked out sources. (Bitbake rev: d17500d3f73fdeeef5f11fb3773a65e927be3f02) 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
5ba68f32a8
commit
6cfb76fa8b
@@ -0,0 +1,33 @@
|
||||
from django.core.management.base import NoArgsCommand, CommandError
|
||||
from django.db import transaction
|
||||
from orm.models import Build
|
||||
from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdException
|
||||
from bldcontrol.models import BuildRequest, BuildEnvironment
|
||||
import os
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
args = ""
|
||||
help = "Verifies thid %dthe configured settings are valid and usable, or prompts the user to fix the settings."
|
||||
|
||||
def handle(self, **options):
|
||||
# we make sure we have builddir and sourcedir for all defined build envionments
|
||||
for be in BuildEnvironment.objects.all():
|
||||
def _verify_be():
|
||||
is_changed = False
|
||||
print("Verifying the Build Environment type %s id %d." % (be.get_betype_display(), be.pk))
|
||||
if len(be.sourcedir) == 0:
|
||||
be.sourcedir = raw_input(" -- sourcedir may not be empty:")
|
||||
is_changed = True
|
||||
if not be.sourcedir.startswith("/"):
|
||||
be.sourcedir = raw_input(" -- sourcedir must be an absolute path:")
|
||||
is_changed = True
|
||||
if len(be.builddir) == 0:
|
||||
be.builddir = raw_input(" -- builddir may not be empty:")
|
||||
is_changed = True
|
||||
if not be.builddir.startswith("/"):
|
||||
be.builddir = raw_input(" -- builddir must be an absolute path:")
|
||||
is_changed = True
|
||||
return is_changed
|
||||
|
||||
while (_verify_be()):
|
||||
pass
|
||||
Reference in New Issue
Block a user