summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-06-24 14:53:21 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-26 09:27:32 +0100
commit583e3207642af9cf3247501bb31ca1ef9bf599fe (patch)
tree482e7c6e11d2e8ded5e481a88c96a73ce6a0886b /bitbake/lib/bb/ui
parent8ef5165b5accaffa59a51a2316ed3304680da224 (diff)
downloadpoky-583e3207642af9cf3247501bb31ca1ef9bf599fe.tar.gz
bitbake: toasterui: verify variable before usage
This patch verifies that BRBE is set before trying to use it to read the checkout paths. This is needed for builds ran outside Toaster control. (Bitbake rev: e04807cd3135c9de96cc7f79245f329c24618b85) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 63976b57e0..cce6da5fad 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -860,10 +860,11 @@ class BuildInfoHelper(object):
860 # convert the paths from absolute to relative to either the build directory or layer checkouts 860 # convert the paths from absolute to relative to either the build directory or layer checkouts
861 path_prefixes = [] 861 path_prefixes = []
862 862
863 br_id, be_id = self.brbe.split(":") 863 if self.brbe is not None:
864 from bldcontrol.models import BuildEnvironment, BuildRequest 864 br_id, be_id = self.brbe.split(":")
865 be = BuildEnvironment.objects.get(pk = be_id) 865 from bldcontrol.models import BuildEnvironment, BuildRequest
866 path_prefixes.append(be.builddir) 866 be = BuildEnvironment.objects.get(pk = be_id)
867 path_prefixes.append(be.builddir)
867 868
868 for layer in sorted(self.orm_wrapper.layer_version_objects, key = lambda x:len(x.local_path), reverse=True): 869 for layer in sorted(self.orm_wrapper.layer_version_objects, key = lambda x:len(x.local_path), reverse=True):
869 path_prefixes.append(layer.local_path) 870 path_prefixes.append(layer.local_path)