Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Patrick Ohly <patrick.ohly@intel.com>
To: Paul Eggleton <paul.eggleton@linux.intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [RFC PATCH 1/1] classes/whitelist: add class to allow whitelisting recipes from a layer
Date: Thu, 20 Aug 2015 15:47:22 +0200	[thread overview]
Message-ID: <1440078442.17136.60.camel@intel.com> (raw)
In-Reply-To: <d1dcc85512f0c7b9b93f2780048bb9fad8c9da2d.1439991144.git.paul.eggleton@linux.intel.com>

On Wed, 2015-08-19 at 14:34 +0100, Paul Eggleton wrote:
> Allow restricting recipes brought from a layer to a specified list. This
> is similar in operation to blacklist.bbclass, but instead specifies a
> per-layer whitelist of recipes (matched by BPN) that are able to be
> built from the layer - anything else is skipped. This is potentially
> useful where you want to bring in a select set of recipes from a larger
> layer e.g. meta-oe.

Worked for all of my tests. I added all layers in meta-openembedded and
then white-listed just gmock in meta-oe (aka openembedded-layer):

INHERIT += "whitelist"

PNWHITELIST_efl-layer = "no-recipe-enabled"
PNWHITELIST_filesystems-layer = "no-recipe-enabled"
PNWHITELIST_gnome-layer = "no-recipe-enabled"
PNWHITELIST_gpe-layer = "no-recipe-enabled"
PNWHITELIST_meta-initramfs = "no-recipe-enabled"
PNWHITELIST_meta-python = "no-recipe-enabled"
PNWHITELIST_multimedia-layer = "no-recipe-enabled"
PNWHITELIST_networking-layer = "no-recipe-enabled"
PNWHITELIST_openembedded-layer = "gmock"
PNWHITELIST_perl-layer = "no-recipe-enabled"
PNWHITELIST_ruby-layer = "no-recipe-enabled"
PNWHITELIST_systemd-layer = "no-recipe-enabled"
PNWHITELIST_toolchain-layer = "no-recipe-enabled"
PNWHITELIST_webserver = "no-recipe-enabled"
PNWHITELIST_xfce-layer = "no-recipe-enabled"

I got warnings for several of the layers, but strangely not for all of
them:

WARNING: No bb files matched BBFILE_PATTERN_efl-layer '^/work/meta-openembedded/meta-efl/'
WARNING: No bb files matched BBFILE_PATTERN_filesystems-layer '^/work/meta-openembedded/meta-filesystems/'
WARNING: No bb files matched BBFILE_PATTERN_gpe-layer '^/work/meta-openembedded/meta-gpe/'
WARNING: No bb files matched BBFILE_PATTERN_meta-initramfs '^/work/meta-openembedded/meta-initramfs/'
WARNING: No bb files matched BBFILE_PATTERN_multimedia-layer '^/work/meta-openembedded/meta-multimedia/'
WARNING: No bb files matched BBFILE_PATTERN_networking-layer '^/work/meta-openembedded/meta-networking/'
WARNING: No bb files matched BBFILE_PATTERN_perl-layer '^/work/meta-openembedded/meta-perl/'
WARNING: No bb files matched BBFILE_PATTERN_meta-python '^/work/meta-openembedded/meta-python/'
WARNING: No bb files matched BBFILE_PATTERN_ruby-layer '^/work/meta-openembedded/meta-ruby/'
WARNING: No bb files matched BBFILE_PATTERN_webserver '^/work/meta-openembedded/meta-webserver/'
WARNING: No bb files matched BBFILE_PATTERN_xfce-layer '^/work/meta-openembedded/meta-xfce/'

Note that gnome-layer is not warned about, although none of its recipes
are enabled (checked with "bitbake-layers show-recipes -f | grep -v
'(skipped)' | grep meta-gnome"). Any idea why?

One more comment: it would be slightly nicer if empty whitelist could be
distinguished from no whitelist, with "empty" meaning "enable no
recipes". In other words, replace "if whitelist" with "if whitelist is
not None".

I want to list all PNWHITELIST_xxx values for meta-openembedded, even
when the layer is not (yet) in bblayers.sample.conf, in order to be
prepared for adding it later. Doing that with an empty string is more
readable than with a fake recipe name to make the variable non-empty.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





  reply	other threads:[~2015-08-20 13:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19 13:34 [RFC PATCH 0/1] Add recipe whitelisting class Paul Eggleton
2015-08-19 13:34 ` [RFC PATCH 1/1] classes/whitelist: add class to allow whitelisting recipes from a layer Paul Eggleton
2015-08-20 13:47   ` Patrick Ohly [this message]
2015-08-21  7:30     ` Huang, Jie (Jackie)
2015-08-24 14:10     ` Patrick Ohly
2015-08-21 10:45   ` Richard Purdie
2015-08-21 10:52     ` Otavio Salvador
2015-08-21 11:59     ` Patrick Ohly
2015-08-21 17:45     ` Khem Raj
2015-08-21 21:43       ` Otavio Salvador
2015-08-21 22:41         ` Richard Purdie
2015-08-24 11:02     ` Paul Eggleton
2015-08-25 16:20       ` Randy MacLeod
2015-08-25 16:32         ` Paul Eggleton

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=1440078442.17136.60.camel@intel.com \
    --to=patrick.ohly@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=paul.eggleton@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox