* [PATCH 0/2] Import the blacklist functionality from meta-oe
@ 2012-05-09 16:08 Mark Hatle
2012-05-09 16:08 ` [PATCH 1/2] blacklist: fix typo in name Mark Hatle
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Mark Hatle @ 2012-05-09 16:08 UTC (permalink / raw)
To: openembedded-core
This imports the blacklist class from meta-oe, and then a subseqent patch
revises it to use the OE variable and change the message generation.
Once accepted into oe-core, a patch for meta-oe will be generated to remove
it from there.
The following changes since commit 043871d7e5d2d19c2ff43e54d2ff180c09e8903e:
kern-tools: integrate minor fixes (2012-05-08 16:06:15 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib mhatle/blacklist
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/blacklist
Mark Hatle (2):
blacklist: fix typo in name
blacklist.bbclass: Rename to OE_BLACKLIST and minor cleanup
meta/classes/blacklist.bbclass | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
create mode 100644 meta/classes/blacklist.bbclass
--
1.7.3.4
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/2] blacklist: fix typo in name 2012-05-09 16:08 [PATCH 0/2] Import the blacklist functionality from meta-oe Mark Hatle @ 2012-05-09 16:08 ` Mark Hatle 2012-05-09 16:08 ` [PATCH 2/2] blacklist.bbclass: Rename to OE_BLACKLIST and minor cleanup Mark Hatle 2012-05-11 17:34 ` [PATCH 0/2] Import the blacklist functionality from meta-oe Saul Wold 2 siblings, 0 replies; 6+ messages in thread From: Mark Hatle @ 2012-05-09 16:08 UTC (permalink / raw) To: openembedded-core Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Import directly from meta-openembedded commit: a63c374cdc785ade69d2998978d08280e671dc1f Signed-off-by: Mark Hatle <mark.hatle@windriver.com> --- meta/classes/blacklist.bbclass | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) create mode 100644 meta/classes/blacklist.bbclass diff --git a/meta/classes/blacklist.bbclass b/meta/classes/blacklist.bbclass new file mode 100644 index 0000000..7bf4a73 --- /dev/null +++ b/meta/classes/blacklist.bbclass @@ -0,0 +1,20 @@ +# anonymous support class from angstrom +# +# Features: +# +# * blacklist handling, set ANGSTROM_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) + + 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)) + +} + -- 1.7.3.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] blacklist.bbclass: Rename to OE_BLACKLIST and minor cleanup 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 ` Mark Hatle 2012-05-09 19:25 ` Richard Purdie 2012-05-11 17:34 ` [PATCH 0/2] Import the blacklist functionality from meta-oe Saul Wold 2 siblings, 1 reply; 6+ messages in thread From: Mark Hatle @ 2012-05-09 16:08 UTC (permalink / raw) To: openembedded-core 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) 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)) } -- 1.7.3.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] blacklist.bbclass: Rename to OE_BLACKLIST and minor cleanup 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 2012-05-09 19:33 ` Mark Hatle 0 siblings, 1 reply; 6+ messages in thread From: Richard Purdie @ 2012-05-09 19:25 UTC (permalink / raw) To: Patches and discussions about the oe-core layer 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] blacklist.bbclass: Rename to OE_BLACKLIST and minor cleanup 2012-05-09 19:25 ` Richard Purdie @ 2012-05-09 19:33 ` Mark Hatle 0 siblings, 0 replies; 6+ messages in thread From: Mark Hatle @ 2012-05-09 19:33 UTC (permalink / raw) To: openembedded-core On 5/9/12 2:25 PM, Richard Purdie wrote: > 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 was wondering about that, but was only thinking "BLACKLIST" and I thought that was way to generic.. PNBLACKLIST it is.. > 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" So stop using the override and switch to using the flags? Should be easy to do. > Cheers, > > Richard > > > > > > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] Import the blacklist functionality from meta-oe 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-11 17:34 ` Saul Wold 2 siblings, 0 replies; 6+ messages in thread From: Saul Wold @ 2012-05-11 17:34 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On 05/09/2012 09:08 AM, Mark Hatle wrote: > This imports the blacklist class from meta-oe, and then a subseqent patch > revises it to use the OE variable and change the message generation. > > Once accepted into oe-core, a patch for meta-oe will be generated to remove > it from there. > > The following changes since commit 043871d7e5d2d19c2ff43e54d2ff180c09e8903e: > > kern-tools: integrate minor fixes (2012-05-08 16:06:15 +0100) > > are available in the git repository at: > git://git.pokylinux.org/poky-contrib mhatle/blacklist > http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/blacklist > > Mark Hatle (2): > blacklist: fix typo in name > blacklist.bbclass: Rename to OE_BLACKLIST and minor cleanup > > meta/classes/blacklist.bbclass | 23 +++++++++++++++++++++++ > 1 files changed, 23 insertions(+), 0 deletions(-) > create mode 100644 meta/classes/blacklist.bbclass > This was merged with the Updated PNBLACKLIST Name Thanks Sau! ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-05-11 17:44 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2012-05-09 19:33 ` Mark Hatle 2012-05-11 17:34 ` [PATCH 0/2] Import the blacklist functionality from meta-oe Saul Wold
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox