From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/2] blacklist.bbclass: Rename to OE_BLACKLIST and minor cleanup
Date: Wed, 09 May 2012 20:25:37 +0100 [thread overview]
Message-ID: <1336591537.2494.64.camel@ted> (raw)
In-Reply-To: <230ca87131ff1d90b63c277422b4c2386b638654.1336579481.git.mark.hatle@windriver.com>
On Wed, 2012-05-09 at 11:08 -0500, Mark Hatle wrote:
> Revise the handling from ANGSTROM_BLACKLIST to OE_BLACKLIST. Preserved
> references to ANGSTROM_BLACKLIST for compatibility with existing users.
>
> Rearrange a bit of the code to avoid unncessary steps if the package does
> not have a blacklist.
>
> Change the message generation from a note to debug, adjust the SkipPackage
> message from:
>
> <distro> DOES NOT support <recipe> because <reason>
>
> to:
>
> Recipe <recipe> is blacklisted: <reason>
>
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> ---
> meta/classes/blacklist.bbclass | 21 ++++++++++++---------
> 1 files changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/meta/classes/blacklist.bbclass b/meta/classes/blacklist.bbclass
> index 7bf4a73..4bf6629 100644
> --- a/meta/classes/blacklist.bbclass
> +++ b/meta/classes/blacklist.bbclass
> @@ -1,20 +1,23 @@
> # anonymous support class from angstrom
> #
> +# To use the blacklist, a distribution should include this
> +# class in the INHERIT_DISTRO
> +#
> +# Modified to allow default to OE_BLACKLIST, with a fallback
> +# to ANGSTROM_BLACKLIST for compatibility
> +#
> # Features:
> #
> -# * blacklist handling, set ANGSTROM_BLACKLIST_pn-blah = "message"
> +# * blacklist handling, set OE_BLACKLIST_pn-blah = "message"
> #
>
> python () {
> - import bb
> -
> - blacklist = bb.data.getVar("ANGSTROM_BLACKLIST", d, 1)
> - pkgnm = bb.data.getVar("PN", d, 1)
> - distro = bb.data.getVar("DISTRO", d, 1)
> + blacklist = d.getVar("OE_BLACKLIST", True) or d.getVar("ANGSTROM_BLACKLIST", True)
OE is pointless as a prefix here.
How about PNBLACKLIST?
I'm also adversed to underscores, particularly on short sets of letter
due to overrides (note to self about considering changing the override
character).
> if blacklist:
> - bb.note("%s DOES NOT support %s because %s" % (distro,pkgnm, blacklist))
> - raise bb.parse.SkipPackage("%s DOES NOT support %s because %s" % (distro,pkgnm, blacklist))
> -
> + distro = d.getVar("DISTRO", True)
> + pkgnm = d.getVar("PN", True)
> + bb.debug(2, "%s DOES NOT support %s because %s" % (distro, pkgnm, blacklist))
> + raise bb.parse.SkipPackage("Recipe %s is blacklisted: %s" % (pkgnm, blacklist))
> }
Lets also drop the distro bit and just say "Configured policy does not
support %s since %s".
We should also add a proper reason in here so how about we make
PNBLACKLIST a set of flags? This breaks compatibility but improves
usability and the message is a big part why we need this class in the
first place.
So the usage would be:
PNBLACKLIST[gconf-dbus] = "dbus support was merged into gconf"
Cheers,
Richard
next prev parent reply other threads:[~2012-05-09 19:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 16:08 [PATCH 0/2] Import the blacklist functionality from meta-oe Mark Hatle
2012-05-09 16:08 ` [PATCH 1/2] blacklist: fix typo in name Mark Hatle
2012-05-09 16:08 ` [PATCH 2/2] blacklist.bbclass: Rename to OE_BLACKLIST and minor cleanup Mark Hatle
2012-05-09 19:25 ` Richard Purdie [this message]
2012-05-09 19:33 ` Mark Hatle
2012-05-11 17:34 ` [PATCH 0/2] Import the blacklist functionality from meta-oe Saul Wold
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=1336591537.2494.64.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
/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