aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-10-11 15:04:06 -0700
committerJoshua Lock <josh@linux.intel.com>2011-11-30 10:41:37 -0800
commit4c86fa86d53fe8b25f2f175c143a9cc2e717d242 (patch)
tree2a72b712b2235207671da2ae8f8b26f5eadd17bf
parent7507ee036e79f9b817c68003f8acaee8af9ed15b (diff)
downloadopenembedded-core-contrib-rfcqacheck.tar.gz
openembedded-core-contrib-rfcqacheck.tar.bz2
openembedded-core-contrib-rfcqacheck.zip
insane.bbclass: add qa check to ensure declared packages existrfcqacheck
This patch adds an extra package sanity check to test whether any extra packages defined by the recipe (i.e. anything other than -dev, -dbg, -doc, -staticdev and -locale packages) are actually created. Signed-off-by: Joshua Lock <josh@linux.intel.com>
-rw-r--r--meta/classes/insane.bbclass11
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 5726e69e71..d6a1190ce0 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -522,6 +522,8 @@ python do_package_qa () {
g = globals()
walk_sane = True
rdepends_sane = True
+ exists = True
+
for package in packages.split():
skip = (d.getVar('INSANE_SKIP_' + package, True) or "").split()
if skip:
@@ -541,13 +543,20 @@ python do_package_qa () {
bb.note("Checking Package: %s" % package)
path = "%s/%s" % (pkgdest, package)
+ allow_empty = bb.data.getVar('ALLOW_EMPTY_%s' % package, d, True)
+ bb.note("ALLOW_EMPTY_%s is %s" % (package, allow_empty))
+ if not allow_empty and not package.endswith("-dev") and not package.endswith("-dbg") and not package.endswith("-doc") and not package.endswith("-staticdev") and not package.endswith("-locale"):
+ contents_len = os.listdir(path)
+ if not contents_len:
+ bb.error("QA Issue: PACKAGE %s defined but not created" % package)
+ exists = False
if not package_qa_walk(path, warnchecks, errorchecks, skip, package, d):
walk_sane = False
if not package_qa_check_rdepends(package, pkgdest, skip, d):
rdepends_sane = False
- if not walk_sane or not rdepends_sane:
+ if not walk_sane or not rdepends_sane or not exists:
bb.fatal("QA run found fatal errors. Please consider fixing them.")
bb.note("DONE with PACKAGE QA")
}