Import the blacklist functionality from meta-oe
cover Import the blacklist functionality from meta-oe
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
Signature · 1 line
1.7.3.4
PATCH 1/2 blacklist: fix typo in name
Import directly from meta-openembedded commit: a63c374cdc785ade69d2998978d08280e671dc1f
--- meta/classes/blacklist.bbclass | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) create mode 100644 meta/classes/blacklist.bbclass
meta/classes/blacklist.bbclass new file +20 -0
@@ -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)) + +} +
Signature · 1 line
1.7.3.4
PATCH 2/2 blacklist.bbclass: Rename to OE_BLACKLIST and minor cleanup
In reply to Mark HatleRevise 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>
--- meta/classes/blacklist.bbclass | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-)
meta/classes/blacklist.bbclass +12 -9
@@ -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)) }
Signature · 1 line
1.7.3.4
Re: [PATCH 2/2] blacklist.bbclass: Rename to OE_BLACKLIST and minor cleanup
Quoted 36 lines · Mark Hatle
Revise the handling from
ANGSTROM_BLACKLISTtoOE_BLACKLIST. Preserved references toANGSTROM_BLACKLISTfor 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 <[email protected]>--- meta/classes/blacklist.bbclass | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-)meta/classes/blacklist.bbclass +6
-1@@ -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"
meta/classes/blacklist.bbclass line 15
Quoted 10 lines
meta/classes/blacklist.bbclass +2
-5+# * 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).
meta/classes/blacklist.bbclass line 22
Quoted 9 lines
meta/classes/blacklist.bbclass +4
-3if 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
Re: [PATCH 2/2] blacklist.bbclass: Rename to OE_BLACKLIST and minor cleanup
Quoted 50 lines · Richard Purdie
Quoted 36 lines · Mark Hatle
Revise the handling from
ANGSTROM_BLACKLISTtoOE_BLACKLIST. Preserved references toANGSTROM_BLACKLISTfor 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<[email protected]>--- meta/classes/blacklist.bbclass | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-)meta/classes/blacklist.bbclass +6
-1@@ -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"meta/classes/blacklist.bbclass line 15
Quoted 10 lines
meta/classes/blacklist.bbclass +2
-5+# * 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.
Quoted 1 line
How about PNBLACKLIST?
I was wondering about that, but was only thinking "BLACKLIST" and I thought that was way to generic.. PNBLACKLIST it is..
Quoted 17 lines
I'm also adversed to underscores, particularly on short sets of letter due to overrides (note to self about considering changing the override character).
meta/classes/blacklist.bbclass line 22
Quoted 9 lines
meta/classes/blacklist.bbclass +4
-3if 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".
Quoted 8 lines
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.
Quoted 14 lines
Cheers,
Richard
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Quoted 14 lines · Mark Hatle
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-contribmhatle/blacklist
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/blacklist
Quoted 8 lines
Mark Hatle (2):
blacklist: fix typo in name
blacklist.bbclass: Rename toOE_BLACKLISTand minor cleanupmeta/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!