diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2013-11-14 13:56:30 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-15 11:48:53 +0000 |
commit | 9fdd8adc17dc732d3983afcaa30b63d69f483dad (patch) | |
tree | 9ce36e083236327ed1f15a52920cd2950de4dc3f /bitbake/lib/bb/ui | |
parent | 51084379d43a6b6bbf828d2adaaccf803e9da081 (diff) | |
download | poky-9fdd8adc17dc732d3983afcaa30b63d69f483dad.tar.gz |
bitbake: cooker, toaster: variable definition tracking
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')
-rw-r--r-- | bitbake/lib/bb/ui/buildinfohelper.py | 14 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/toasterui.py | 2 |
2 files changed, 11 insertions, 5 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") | |||
27 | 27 | ||
28 | import toaster.toastermain.settings as toaster_django_settings | 28 | import toaster.toastermain.settings as toaster_django_settings |
29 | from toaster.orm.models import Build, Task, Recipe, Layer_Version, Layer, Target, LogMessage | 29 | from toaster.orm.models import Build, Task, Recipe, Layer_Version, Layer, Target, LogMessage |
30 | from toaster.orm.models import Target_Package, Build_Package, Variable, Build_File | 30 | from toaster.orm.models import Variable, VariableHistory |
31 | from toaster.orm.models import Task_Dependency, Build_Package_Dependency, Target_Package_Dependency, Recipe_Dependency | 31 | from toaster.orm.models import Target_Package, Build_Package, Build_File |
32 | from toaster.orm.models import Task_Dependency, Build_Package_Dependency | ||
33 | from toaster.orm.models import Target_Package_Dependency, Recipe_Dependency | ||
32 | from bb.msg import BBLogFormatter as format | 34 | from bb.msg import BBLogFormatter as format |
33 | 35 | ||
34 | class ORMWrapper(object): | 36 | class ORMWrapper(object): |
@@ -238,11 +240,15 @@ class ORMWrapper(object): | |||
238 | desc = vardump[root_var]['doc'] | 240 | desc = vardump[root_var]['doc'] |
239 | if desc is None: | 241 | if desc is None: |
240 | desc = '' | 242 | desc = '' |
241 | Variable.objects.create( build = build_obj, | 243 | variable_obj = Variable.objects.create( build = build_obj, |
242 | variable_name = k, | 244 | variable_name = k, |
243 | variable_value = value, | 245 | variable_value = value, |
244 | description = desc) | 246 | description = desc) |
245 | 247 | for vh in vardump[k]['history']: | |
248 | VariableHistory.objects.create( variable = variable_obj, | ||
249 | file_name = vh['file'], | ||
250 | line_number = vh['line'], | ||
251 | operation = vh['op']) | ||
246 | 252 | ||
247 | class BuildInfoHelper(object): | 253 | class BuildInfoHelper(object): |
248 | """ This class gathers the build information from the server and sends it | 254 | """ This class gathers the build information from the server and sends it |
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py index 6c5b1529df..d2dba256c4 100644 --- a/bitbake/lib/bb/ui/toasterui.py +++ b/bitbake/lib/bb/ui/toasterui.py | |||
@@ -41,7 +41,7 @@ import sys | |||
41 | import time | 41 | import time |
42 | import xmlrpclib | 42 | import xmlrpclib |
43 | 43 | ||
44 | featureSet = [bb.cooker.CookerFeatures.HOB_EXTRA_CACHES, bb.cooker.CookerFeatures.SEND_DEPENDS_TREE] | 44 | featureSet = [bb.cooker.CookerFeatures.HOB_EXTRA_CACHES, bb.cooker.CookerFeatures.SEND_DEPENDS_TREE, bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING] |
45 | 45 | ||
46 | logger = logging.getLogger("BitBake") | 46 | logger = logging.getLogger("BitBake") |
47 | interactive = sys.stdout.isatty() | 47 | interactive = sys.stdout.isatty() |