diff options
author | Chris Larson <clarson@mvista.com> | 2009-06-19 12:48:28 -0700 |
---|---|---|
committer | Chris Larson <clarson@mvista.com> | 2009-06-19 12:48:28 -0700 |
commit | 715ccad5fe7ebf50661b8787a17091a76474a5fa (patch) | |
tree | ec816cf45d4f41d76c6e61940ba79e6b733c8cd6 /classes | |
parent | df7ddd8feaeab6b39ee784a581dfd723d79e9b80 (diff) |
recipe_sanity.bbclass: only check RPROVIDES/RDEPENDS in target recipes.
Signed-off-by: Chris Larson <clarson@mvista.com>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/recipe_sanity.bbclass | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/classes/recipe_sanity.bbclass b/classes/recipe_sanity.bbclass index 3b834c8223..29f4a8fada 100644 --- a/classes/recipe_sanity.bbclass +++ b/classes/recipe_sanity.bbclass @@ -2,9 +2,14 @@ def __note(msg, d): import bb bb.note("%s: recipe_sanity: %s" % (d.getVar("P", 1), msg)) -__recipe_sanity_badvars = "RDEPENDS RPROVIDES" -def bad_vars(cfgdata, d): - for var in d.getVar("__recipe_sanity_badvars", 1).split(): +__recipe_sanity_badtargetvars = "RDEPENDS RPROVIDES" +def bad_target_vars(cfgdata, d): + import bb.data + if bb.data.inherits_class("native", d) or \ + bb.data.inherits_class("cross", d): + return + + for var in d.getVar("__recipe_sanity_badtargetvars", 1).split(): val = d.getVar(var, 0) if val and val != cfgdata.get(var): __note("%s should not be set, but is set to '%s'" % (var, val), d) @@ -137,7 +142,7 @@ python do_recipe_sanity () { can_remove_others(p, cfgdata, d) var_renames_overwrite(cfgdata, d) req_vars(cfgdata, d) - bad_vars(cfgdata, d) + bad_target_vars(cfgdata, d) } do_recipe_sanity[nostamp] = "1" #do_recipe_sanity[recrdeptask] = "do_recipe_sanity" |