All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Cristiana Voicu <cristiana.voicu@intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 2/5] bitbake: add a new command and modify others
Date: Thu, 20 Jun 2013 08:36:51 +0100	[thread overview]
Message-ID: <1371713811.20823.216.camel@ted> (raw)
In-Reply-To: <1371651387-20886-3-git-send-email-cristiana.voicu@intel.com>

On Wed, 2013-06-19 at 17:16 +0300, Cristiana Voicu wrote:
> This patch adds a new command to create an extra configuration
> file, in order to create it from Hob.
> Also, it removes 2 commands used to enable and disable the tracking
> history for variables, because it will be called in the body of each
> command when needed.

I'm not sure I like the idea of hard coding in when the tracking gets
turned on/off. Can we not do this at the correct points in hob?

The rest of the patch series looks good but the removal of these
commands is giving me some concern.

Cheers,

Richard




> Modified the prefiles and postfiles variables because the cooker
> expects some lists.
> 
> Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
> ---
>  bitbake/lib/bb/command.py |   30 +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
> index 5f696c2..9ddb96d 100644
> --- a/bitbake/lib/bb/command.py
> +++ b/bitbake/lib/bb/command.py
> @@ -174,18 +174,6 @@ class CommandsSync:
>          value = str(params[1])
>          setattr(command.cooker.configuration, varname, value)
>  
> -    def enableDataTracking(self, command, params):
> -        """
> -        Enable history tracking for variables
> -        """
> -        command.cooker.enableDataTracking()
> -
> -    def disableDataTracking(self, command, params):
> -        """
> -        Disable history tracking for variables
> -        """
> -        command.cooker.disableDataTracking()
> -
>      def initCooker(self, command, params):
>          """
>          Init the cooker to initial state with nothing parsed
> @@ -217,10 +205,22 @@ class CommandsSync:
>          return command.cooker.generateNewImage(image, base_image, package_queue)
>  
>      def setVarFile(self, command, params):
> +        """
> +        Save a variable in a file; used for saving in a configuration file
> +        """
>          var = params[0]
>          val = params[1]
>          default_file = params[2]
> +        command.cooker.enableDataTracking()
>          command.cooker.saveConfigurationVar(var, val, default_file)
> +        command.cooker.disableDataTracking()
> +
> +    def createConfigFile(self, command, params):
> +        """
> +        Create an extra configuration file
> +        """
> +        name = params[0]
> +        command.cooker.createConfigFile(name)
>  
>  class CommandsAsync:
>      """
> @@ -390,11 +390,11 @@ class CommandsAsync:
>          """
>          Parse the configuration files
>          """
> -        prefiles = params[0]
> -        postfiles = params[1]
> +        prefiles = params[0].split()
> +        postfiles = params[1].split()
>          command.cooker.configuration.prefile = prefiles
>          command.cooker.configuration.postfile = postfiles
> -        command.cooker.loadConfigurationData()
> +        command.cooker.loadConfigurationData(tracking=True)
>          command.finishAsyncCommand()
>      parseConfigurationFiles.needcache = False
>  




  reply	other threads:[~2013-06-20  7:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19 14:16 [PATCH 0/5] Make changes in Hob in order to work correctly with bitbake-worker Cristiana Voicu
2013-06-19 14:16 ` [PATCH 1/5] hob: remove the rest of the old template functionality Cristiana Voicu
2013-06-19 14:16 ` [PATCH 2/5] bitbake: add a new command and modify others Cristiana Voicu
2013-06-20  7:36   ` Richard Purdie [this message]
2013-06-19 14:16 ` [PATCH 3/5] bitbake: call the initConfiguration when reparsing Cristiana Voicu
2013-06-19 14:16 ` [PATCH 4/5] hob: replace the init cooker with reset in order to keep the history Cristiana Voicu
2013-06-19 14:16 ` [PATCH 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=1371713811.20823.216.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.