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: Sat, 31 Mar 2012 16:51:01 +0100	[thread overview]
Message-ID: <1333209061.18082.245.camel@ted> (raw)
In-Reply-To: <1333171790.4073.9.camel@dongxiao-osel>

On Sat, 2012-03-31 at 13:29 +0800, Xu, Dongxiao wrote:
> On Sat, 2012-03-31 at 08:32 +0800, Xu, Dongxiao wrote:
> > On Fri, 2012-03-30 at 09:10 -0700, Joshua Lock wrote:
> > > 
> > > On 30/03/12 05:01, Dongxiao Xu wrote:
> > > > For layers defined in bblayers.conf, we treat them as default layers
> > > > and users are not allowed to remove them.
> > > 
> > > Can you explain the rationale behind this change? I see what you're 
> > > doing but it's not entirely clear why.
> > > 
> > > I think this is a bad idea. Early on in the design of Hob we decided we 
> > > didn't want configuration made for non-Hob builds to affect builds made 
> > > with Hob, and vice versa.
> > 
> > The issue I am going to solve is that, with current local.conf
> > (DISTRO="poky") and bblayers.conf (bblayers="meta meta-yocto"), we are
> > not able to delete the meta-yocto layer in Hob since it will meet
> > local.conf parsing error since it could not find where "poky" is
> > defined.
> > 
> > This patch is to set those layers define in bblayers.conf as default
> > layers and they could not be removed. For example, in Yocto Project,
> > "meta", "meta-yocto", and "meta-hob" are not removable. For pure OE-Core
> > environment, "meta" and "meta-hob" are not removable.
> > 
> 
> Just discussed with Josh on this problem.
> 
> He suggested that meta-yocto should be still removable. If user met the
> error after deleting the meta-yocto layer, he/she should change the
> DISTRO setting in "Setting" dialog to "defaultsetup".
> 
> Current code to handle the distro setting is:
> 
>     def set_distro(self, distro):  
>         if distro != "defaultsetup":   
>             self.server.runCommand(["setVariable", "DISTRO", distro])
> 
> Therefore even if user has selected defaultsetup, it will not set any
> value to bitbake server, and then DISTRO ?= "poky" will take effect
> while parsing local.conf.
> 
> To make DISTRO ?= "poky" doesn't take effect, we need to change the code
> to be:
> 
>     def set_distro(self, distro):  
>         if distro == "defaultsetup":   
>             distro = ""
>         self.server.runCommand(["setVariable", "DISTRO", distro])
> 
> However Richard ever worried about this approach.
> See:
> http://lists.linuxtogo.org/pipermail/bitbake-devel/2012-March/002438.html
> 
> In summary, there are two solutions now:
> 
> 1) Set those layers defined in bblayers.conf as default, and don't allow
> users to delete them, like this [PATCH 3/7] does.
> 2) Use the empty string "" as the value of DISTRO variable for
> "defaultsetup", and set this value before parsing configuration files,
> making the DISTRO ?= "poky" in local.conf doesn't take effect.
> 
> Welcome for comments on this issue.

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.

Cheers,

Richard




  reply	other threads:[~2012-03-31 16:00 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 [this message]
2012-04-01  5:35           ` Xu, Dongxiao
2012-04-02 12:42             ` Richard Purdie
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=1333209061.18082.245.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.