From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Cristiana Voicu <cristiana.voicu@intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH_V2 3/5] bitbake: call the initConfiguration when reparsing
Date: Thu, 20 Jun 2013 13:25:41 +0100 [thread overview]
Message-ID: <1371731141.20823.232.camel@ted> (raw)
In-Reply-To: <1371723585-27966-4-git-send-email-cristiana.voicu@intel.com>
On Thu, 2013-06-20 at 13:19 +0300, Cristiana Voicu wrote:
> As it is implemented now, when parsing the configuration files is
> needed, it also needs an initialization.
> Also, implemented a function to create an extra configuration files
> which can be used as postfile/prefiles when parsing.
>
> Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
> ---
> bitbake/lib/bb/cooker.py | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
> index f375a6f..e1b33f1 100644
> --- a/bitbake/lib/bb/cooker.py
> +++ b/bitbake/lib/bb/cooker.py
> @@ -109,7 +109,6 @@ class BBCooker:
> sys.exit("FATAL: Failed to import extra cache class '%s'." % cache_name)
>
> self.data = None
> - self.initConfigurationData()
> self.loadConfigurationData()
>
> # Take a lock so only one copy of bitbake can run against a given build
> @@ -155,7 +154,10 @@ class BBCooker:
> def disableDataTracking(self):
> self.data.disableTracking()
>
> - def loadConfigurationData(self):
> + def loadConfigurationData(self, tracking = False):
> + self.initConfigurationData()
> + if tracking:
> + self.enableDataTracking()
> self.databuilder.parseBaseConfiguration()
> self.data = self.databuilder.data
> self.data_hash = self.databuilder.data_hash
> @@ -243,6 +245,11 @@ class BBCooker:
> loginfo = {"op":set, "file":default_file, "line":total.count("\n")}
> self.data.setVar(var, val, **loginfo)
>
> + def createConfigFile(self, name):
> + path = os.getcwd()
> + confpath = os.path.join(path, "conf", name)
> + open(confpath, 'w').close()
> +
> def parseConfiguration(self):
>
> # Set log file verbosity
> @@ -1201,8 +1208,7 @@ class BBCooker:
>
> def reset(self):
> self.state = state.initial
> - self.initConfigurationData()
> - self.loadConfigurationData()
> + self.loadConfigurationData(tracking=True)
I don't like having one default used in some cases yet the reset does
something different by default. Can you set the tracking to enabled from
hob please instead of this default?
Cheers,
Richard
next prev parent reply other threads:[~2013-06-20 12:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 10:19 [PATCH_V2 0/5] Chnages in Hob in order to work correctly with bitbake-worker Cristiana Voicu
2013-06-20 10:19 ` [PATCH_V2 1/5] hob: remove the rest of the old template functionality Cristiana Voicu
2013-06-20 10:19 ` [PATCH_V2 2/5] bitbake & hob: modify some commands and call them from hob Cristiana Voicu
2013-06-20 10:19 ` [PATCH_V2 3/5] bitbake: call the initConfiguration when reparsing Cristiana Voicu
2013-06-20 12:25 ` Richard Purdie [this message]
2013-06-20 10:19 ` [PATCH_V2 4/5] hob: replace the init cooker with reset in order to keep the history Cristiana Voicu
2013-06-20 10:19 ` [PATCH_V2 5/5] hob: save variables in conf/ directory Cristiana Voicu
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=1371731141.20823.232.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
--cc=cristiana.voicu@intel.com \
/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.