diff options
author | Chris Larson <clarson@mvista.com> | 2009-06-19 09:13:30 -0700 |
---|---|---|
committer | Chris Larson <clarson@mvista.com> | 2009-06-19 09:13:52 -0700 |
commit | 5c66c828be4ccbaa923ca34e89c36603740fd847 (patch) | |
tree | bd24b0e898c824ff515cdad00f3fa37b0323384f /classes/recipe_sanity.bbclass | |
parent | b0feb8aed2ec0501cf7cbd57b10254711ea702c1 (diff) |
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/recipe_sanity.bbclass')
-rw-r--r-- | classes/recipe_sanity.bbclass | 25 |
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 |