aboutsummaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorChris Larson <clarson@mvista.com>2009-06-19 09:13:30 -0700
committerChris Larson <clarson@mvista.com>2009-06-19 09:13:52 -0700
commit5c66c828be4ccbaa923ca34e89c36603740fd847 (patch)
treebd24b0e898c824ff515cdad00f3fa37b0323384f /classes
parentb0feb8aed2ec0501cf7cbd57b10254711ea702c1 (diff)
downloadopenembedded-5c66c828be4ccbaa923ca34e89c36603740fd847.tar.gz
recipe_sanity: add check for PACKAGES in native/cross and split to recipe_sanity_all.
Signed-off-by: Chris Larson <clarson@mvista.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/recipe_sanity.bbclass25
1 files changed, 20 insertions, 5 deletions
diff --git a/classes/recipe_sanity.bbclass b/classes/recipe_sanity.bbclass
index a10755cf47..4d00ddf1e5 100644
--- a/classes/recipe_sanity.bbclass
+++ b/classes/recipe_sanity.bbclass
@@ -1,3 +1,10 @@
+def incorrect_nonempty_PACKAGES(cfgdata, d):
+ import bb.data
+ if bb.data.inherits_class("native", d) or \
+ bb.data.inherits_class("cross", d):
+ if d.getVar("PACKAGES", 1):
+ return True
+
def can_use_autotools_base(cfgdata, d):
import bb
cfg = d.getVar("do_configure", 1)
@@ -76,22 +83,30 @@ python do_recipe_sanity () {
p = "%s %s %s" % (d.getVar("PN", 1), d.getVar("PV", 1), d.getVar("PR", 1))
sanitychecks = [
- (can_remove_FILESDIR, "removal of FILESDIR"),
- (can_remove_FILESPATH, "removal of FILESPATH"),
- #(can_use_autotools_base, "use of autotools_base"),
+ (can_remove_FILESDIR, "candidate for removal of FILESDIR"),
+ (can_remove_FILESPATH, "candidate for removal of FILESPATH"),
+ #(can_use_autotools_base, "candidate for use of autotools_base"),
+ (incorrect_nonempty_PACKAGES, "native or cross recipe with non-empty PACKAGES"),
]
cfgdata = d.getVar("__recipe_sanity_cfgdata", 0)
for (func, msg) in sanitychecks:
if func(cfgdata, d):
- bb.note("%s: recipe_sanity: candidate for %s" % (p, msg))
+ bb.note("%s: recipe_sanity: %s" % (p, msg))
can_remove_others(p, cfgdata, d)
}
do_recipe_sanity[nostamp] = "1"
-do_recipe_sanity[recrdeptask] = "do_recipe_sanity"
+#do_recipe_sanity[recrdeptask] = "do_recipe_sanity"
addtask recipe_sanity
+do_recipe_sanity_all[nostamp] = "1"
+do_recipe_sanity_all[recrdeptask] = "do_recipe_sanity"
+do_recipe_sanity_all () {
+ :
+}
+addtask recipe_sanity_all after do_recipe_sanity
+
python recipe_sanity_eh () {
from bb.event import getName