summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/buildinfohelper.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2013-11-14 13:56:30 +0000
committerAlexandru DAMIAN <alexandru.damian@intel.com>2013-11-15 12:18:03 +0000
commit1182665de0da9a6e5fc77107f32a7fc1515029d0 (patch)
tree813be818732cef39f64815ca2a9cade8fd86dfb3 /bitbake/lib/bb/ui/buildinfohelper.py
parent6302d1baf516d5cff5d2b65cc734ca5098a26894 (diff)
downloadpoky-dora-toaster.tar.gz
poky-dora-toaster.tar.bz2
poky-dora-toaster.zip
bitbake: cooker, toaster: variable definition trackingdora-toaster
In order to track the file where a configuration variable was defined, this patch bring these changes: * a new feature is defined in CookerFeatures, named BASEDATASTORE_TRACKING. When a UI requests BASEDATASTORE_TRACKING, the base variable definition are tracked when configuration is parsed. * getAllKeysWithFlags now includes variable history in the data dump * toaster_ui.py will record the operation, file path and line number where the variable was changes * toaster Simple UI will display the file path and line number for Configuration page There is a change in the models to accomodate the recording of variable change history. [YOCTO #5227] (Bitbake rev: 78e58fed82f2a71f052485de0052d7b9cca53ffd) 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/buildinfohelper.py')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index c4131aebf0..170ee12a7e 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -27,8 +27,10 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "toaster.toastermain.settings")
import toaster.toastermain.settings as toaster_django_settings
from toaster.orm.models import Build, Task, Recipe, Layer_Version, Layer, Target, LogMessage
-from toaster.orm.models import Target_Package, Build_Package, Variable, Build_File
-from toaster.orm.models import Task_Dependency, Build_Package_Dependency, Target_Package_Dependency, Recipe_Dependency
+from toaster.orm.models import Variable, VariableHistory
+from toaster.orm.models import Target_Package, Build_Package, Build_File
+from toaster.orm.models import Task_Dependency, Build_Package_Dependency
+from toaster.orm.models import Target_Package_Dependency, Recipe_Dependency
from bb.msg import BBLogFormatter as format
class ORMWrapper(object):
@@ -238,11 +240,15 @@ class ORMWrapper(object):
desc = vardump[root_var]['doc']
if desc is None:
desc = ''
- Variable.objects.create( build = build_obj,
+ variable_obj = Variable.objects.create( build = build_obj,
variable_name = k,
variable_value = value,
description = desc)
-
+ for vh in vardump[k]['history']:
+ VariableHistory.objects.create( variable = variable_obj,
+ file_name = vh['file'],
+ line_number = vh['line'],
+ operation = vh['op'])
class BuildInfoHelper(object):
""" This class gathers the build information from the server and sends it