From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Alex DAMIAN <alexandru.damian@intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH v2] cooker, toaster: variable definition tracking
Date: Fri, 15 Nov 2013 11:28:20 +0000 [thread overview]
Message-ID: <1384514900.6460.146.camel@ted> (raw)
In-Reply-To: <1384437390-10392-1-git-send-email-alexandru.damian@intel.com>
On Thu, 2013-11-14 at 13:56 +0000, Alex DAMIAN wrote:
> From: Alexandru DAMIAN <alexandru.damian@intel.com>
>
> 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]
>
> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
> ---
> lib/bb/cooker.py | 15 ++++++++++++---
> lib/bb/cookerdata.py | 1 +
> lib/bb/ui/buildinfohelper.py | 14 ++++++++++----
> lib/bb/ui/toasterui.py | 2 +-
> lib/toaster/bldviewer/templates/configuration.html | 6 ++++--
> lib/toaster/orm/models.py | 6 +++++-
> 6 files changed, 33 insertions(+), 11 deletions(-)
>
> diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
> index 0580cd5..4c9067b 100644
> --- a/lib/bb/cooker.py
> +++ b/lib/bb/cooker.py
> @@ -81,7 +81,7 @@ class SkippedPackage:
>
>
> class CookerFeatures(object):
> - _feature_list = [HOB_EXTRA_CACHES, SEND_DEPENDS_TREE] = range(2)
> + _feature_list = [HOB_EXTRA_CACHES, SEND_DEPENDS_TREE, BASEDATASTORE_TRACKING] = range(3)
>
> def __init__(self):
> self._features=set()
> @@ -177,6 +177,9 @@ class BBCooker:
> self.data.disableTracking()
>
> def loadConfigurationData(self):
> + if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
> + self.enableDataTracking()
> +
> self.initConfigurationData()
> self.databuilder.parseBaseConfiguration()
> self.data = self.databuilder.data
> @@ -189,6 +192,10 @@ class BBCooker:
> bb.data.update_data(self.event_data)
> bb.parse.init_parser(self.event_data)
>
> + if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
> + self.disableDataTracking()
> +
> +
> def modifyConfigurationVar(self, var, val, default_file, op):
> if op == "append":
> self.appendConfigurationVar(var, val, default_file)
> @@ -320,7 +327,6 @@ class BBCooker:
> open(confpath, 'w').close()
>
> def parseConfiguration(self):
> -
> # Set log file verbosity
> verboselogs = bb.utils.to_boolean(self.data.getVar("BB_VERBOSE_LOGS", "0"))
> if verboselogs:
> @@ -1175,7 +1181,10 @@ class BBCooker:
> try:
> v = self.data.getVar(k, True)
> if not k.startswith("__") and not isinstance(v, bb.data_smart.DataSmart):
> - dump[k] = { 'v' : v }
> + dump[k] = {
> + 'v' : v ,
> + 'history' : self.data.varhistory.variable(k),
> + }
> for d in flaglist:
> dump[k][d] = self.data.getVarFlag(k, d)
> except Exception as e:
> diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
> index e640ed0..1cc7bc2 100644
> --- a/lib/bb/cookerdata.py
> +++ b/lib/bb/cookerdata.py
> @@ -127,6 +127,7 @@ class CookerConfiguration(object):
> self.dump_signatures = False
> self.dry_run = False
> self.tracking = False
> + self.server_only = False
>
> self.env = {}
>
Patch looks ok in general but I think the above is leftover and
unneeded?
Cheers,
Richard
next prev parent reply other threads:[~2013-11-15 11:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 10:52 [PATCH 0/5] bug fixes for Toaster Alex DAMIAN
2013-11-14 10:52 ` [PATCH 1/5] cooker, toaster: variable definition tracking Alex DAMIAN
2013-11-14 13:56 ` [PATCH v2] " Alex DAMIAN
2013-11-15 11:28 ` Richard Purdie [this message]
2013-11-15 11:35 ` Damian, Alexandru
2013-11-14 10:52 ` [PATCH 2/5] toaster: fix tasks showing as NoExec Alex DAMIAN
2013-11-14 10:52 ` [PATCH 3/5] toaster: remove author field Alex DAMIAN
2013-11-14 10:53 ` [PATCH 4/5] toaster: fix path to buildstats file Alex DAMIAN
2013-11-14 10:53 ` [PATCH 5/5] toasterui: mark failed sceneQueue tasks as failed Alex DAMIAN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1384514900.6460.146.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=alexandru.damian@intel.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.