Patchwork [bitbake-devel] cache: allow to set EXCLUDE_FROM_WORLD outside recipe

login
register
mail settings
Submitter Martin Jansa
Date Dec. 23, 2012, 8:22 p.m.
Message ID <1356294176-12058-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/41601/
State Rejected, archived
Headers show

Comments

Martin Jansa - Dec. 23, 2012, 8:22 p.m.
* sometimes it's useful for distro/builder to set EXCLUDE_FROM_WORLD_foo = "1"
  to exclude recipes not supported by distro/builder in some include file

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 lib/bb/cache.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Chris Larson - Dec. 23, 2012, 8:36 p.m.
On Sun, Dec 23, 2012 at 1:22 PM, Martin Jansa <martin.jansa@gmail.com>wrote:

> * sometimes it's useful for distro/builder to set EXCLUDE_FROM_WORLD_foo =
> "1"
>   to exclude recipes not supported by distro/builder in some include file
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
>

EXCLUDE_FROM_WORLD_pn-foo = "1"
Martin Jansa - Dec. 23, 2012, 8:45 p.m.
On Sun, Dec 23, 2012 at 01:36:42PM -0700, Chris Larson wrote:
> On Sun, Dec 23, 2012 at 1:22 PM, Martin Jansa <martin.jansa@gmail.com>wrote:
> 
> > * sometimes it's useful for distro/builder to set EXCLUDE_FROM_WORLD_foo =
> > "1"
> >   to exclude recipes not supported by distro/builder in some include file
> >
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> >
> 
> EXCLUDE_FROM_WORLD_pn-foo = "1"

I've used what LOCALCOUNT is using, but I can change it to _pn-foo if
wanted.
Chris Larson - Dec. 23, 2012, 11:48 p.m.
On Sun, Dec 23, 2012 at 1:45 PM, Martin Jansa <martin.jansa@gmail.com>wrote:

> On Sun, Dec 23, 2012 at 01:36:42PM -0700, Chris Larson wrote:
> > On Sun, Dec 23, 2012 at 1:22 PM, Martin Jansa <martin.jansa@gmail.com
> >wrote:
> >
> > > * sometimes it's useful for distro/builder to set
> EXCLUDE_FROM_WORLD_foo =
> > > "1"
> > >   to exclude recipes not supported by distro/builder in some include
> file
> > >
> > > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > >
> >
> > EXCLUDE_FROM_WORLD_pn-foo = "1"
>
> I've used what LOCALCOUNT is using, but I can change it to _pn-foo if
> wanted.


The point was, you shouldn't need to patch anything in at all. pn-${PN} is
in OVERRIDES. The above line should work fine as is with no bitbake changes.
Martin Jansa - Dec. 27, 2012, 12:38 p.m.
On Sun, Dec 23, 2012 at 04:48:30PM -0700, Chris Larson wrote:
> On Sun, Dec 23, 2012 at 1:45 PM, Martin Jansa <martin.jansa@gmail.com>wrote:
> 
> > On Sun, Dec 23, 2012 at 01:36:42PM -0700, Chris Larson wrote:
> > > On Sun, Dec 23, 2012 at 1:22 PM, Martin Jansa <martin.jansa@gmail.com
> > >wrote:
> > >
> > > > * sometimes it's useful for distro/builder to set
> > EXCLUDE_FROM_WORLD_foo =
> > > > "1"
> > > >   to exclude recipes not supported by distro/builder in some include
> > file
> > > >
> > > > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > > >
> > >
> > > EXCLUDE_FROM_WORLD_pn-foo = "1"
> >
> > I've used what LOCALCOUNT is using, but I can change it to _pn-foo if
> > wanted.
> 
> 
> The point was, you shouldn't need to patch anything in at all. pn-${PN} is
> in OVERRIDES. The above line should work fine as is with no bitbake changes.

Ah, right, thanks!

No idea why that didn't work when I've tried it before this patch, but
now it works fine.

Cheers,

Patch

diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index a3c073a..3486f39 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -128,7 +128,7 @@  class CoreRecipeInfo(RecipeInfoCommon):
         self.pr = self.getvar('PR', metadata)
         self.defaultpref = self.intvar('DEFAULT_PREFERENCE', metadata)
         self.broken = self.getvar('BROKEN', metadata)
-        self.not_world = self.getvar('EXCLUDE_FROM_WORLD', metadata)
+        self.not_world = self.getvar('EXCLUDE_FROM_WORLD', metadata) or self.getVar("EXCLUDE_FROM_WORLD_" + self.pn, metadata)
         self.stamp = self.getvar('STAMP', metadata)
         self.stampclean = self.getvar('STAMPCLEAN', metadata)        
         self.stamp_base = self.flaglist('stamp-base', self.tasks, metadata)