All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "Xu, Dongxiao" <dongxiao.xu@intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 3/7] Hob: Make layers define in bblayers.conf as default
Date: Mon, 02 Apr 2012 13:42:01 +0100	[thread overview]
Message-ID: <1333370521.647.33.camel@ted> (raw)
In-Reply-To: <1333258512.4073.14.camel@dongxiao-osel>

On Sun, 2012-04-01 at 13:35 +0800, Xu, Dongxiao wrote:
> On Sat, 2012-03-31 at 16:51 +0100, Richard Purdie wrote:
> > I'd be happy if you change the above code to do:
> > 
> >         self.server.runCommand(["deleteVariable", "DISTRO"])
> > 
> > which is subtly different but consistent with what we really want. I
> > have no idea if we have a deleteVariable command but if we don't, we
> > should add one.
> 
> I ever tried this approach with the following patch, however it didn't
> work. The setting of DISTRO ?= "poky" will still take effect.
>
> It seems that delVar(DISTRO) is different from setting DISTRO="".

It is different but it is what setting up OE-Core without DISTRO set
does and that is known to work.

We need to understand why this isn't working as it should...

Cheers,

Richard


> 
> diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
> index 73aaca0..a7b41ce 100644
> --- a/bitbake/lib/bb/command.py
> +++ b/bitbake/lib/bb/command.py
> @@ -160,6 +160,13 @@ class CommandsSync:
>          value = params[1]
>          command.cooker.configuration.data.setVar(varname, value)
> 
> +    def delVariable(self, command, params):
> +        """
> +        Delete the variable in configuration.data
> +        """
> +        varname = params[0]
> +        command.cooker.configuration.data.delVar(varname)
> +
>      def initCooker(self, command, params):
>          """
>          Init the cooker to initial state with nothing parsed
> diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
> b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
> index 8909e01..d236a72 100644
> --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
> +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
> @@ -265,7 +265,9 @@ class HobHandler(gobject.GObject):
>          self.server.runCommand(["setVariable", "IMAGE_FSTYPES",
> image_fstypes])
> 
>      def set_distro(self, distro):
> -        if distro != "defaultsetup":
> +        if distro == "defaultsetup":
> +            self.server.runCommand(["delVariable", "DISTRO"])
> +        else:
>              self.server.runCommand(["setVariable", "DISTRO", distro])
> 
>      def set_package_format(self, format):





  reply	other threads:[~2012-04-02 12:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-30 12:01 [PATCH 0/7][PULL] Hob: Bug fixes Dongxiao Xu
2012-03-30 12:01 ` [PATCH 1/7] Hob: Fix MACHINE setting Dongxiao Xu
2012-03-30 12:01 ` [PATCH 2/7] Hob: Update the cache when setting changed Dongxiao Xu
2012-03-30 12:01 ` [PATCH 3/7] Hob: Make layers define in bblayers.conf as default Dongxiao Xu
2012-03-30 16:10   ` Joshua Lock
2012-03-31  0:32     ` Xu, Dongxiao
2012-03-31  5:29       ` Xu, Dongxiao
2012-03-31 15:51         ` Richard Purdie
2012-04-01  5:35           ` Xu, Dongxiao
2012-04-02 12:42             ` Richard Purdie [this message]
2012-04-02 12:55             ` Richard Purdie
2012-04-04  0:23               ` Joshua Lock
2012-04-08  2:00                 ` Wang, Shane
2012-03-30 12:01 ` [PATCH 4/7] Revert "lib/bb/ui/crumbs/hig: fix layers_changed test" Dongxiao Xu
2012-03-30 16:10   ` Joshua Lock
2012-03-31  0:32     ` Xu, Dongxiao
2012-03-30 12:01 ` [PATCH 5/7] Hob: Remove some calling of initiate_new_build() Dongxiao Xu
2012-03-30 12:01 ` [PATCH 6/7] Hob: Remove duplication for certain bitbake variables Dongxiao Xu
2012-03-30 12:01 ` [PATCH 7/7] Hob: Set stop button sensitive after task started Dongxiao Xu

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=1333370521.647.33.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=dongxiao.xu@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.