[oe-commits] Chris Larson : recipe_sanity: add check for PACKAGES in native/ cross and split to recipe_sanity_all.

git version control git at git.openembedded.org
Fri Jun 19 16:14:43 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 5c66c828be4ccbaa923ca34e89c36603740fd847
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=5c66c828be4ccbaa923ca34e89c36603740fd847

Author: Chris Larson <clarson at mvista.com>
Date:   Fri Jun 19 09:13:30 2009 -0700

recipe_sanity: add check for PACKAGES in native/cross and split to recipe_sanity_all.

Signed-off-by: Chris Larson <clarson at mvista.com>

---

 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 a10755c..4d00ddf 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
 





More information about the Openembedded-commits mailing list