summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2015-02-04 21:05:14 +0000
committerRoss Burton <ross.burton@intel.com>2015-06-19 10:21:43 +0100
commitaec59a34380dd30715fd81f6634c5bccd0af317f (patch)
tree6e9dcee76e551fb4cfe6d8e280ed084f51db6f26
parent63ac2b3b82e132980b04709eed322214caf2da18 (diff)
downloadpoky-contrib-ross/insane.tar.gz
poky-contrib-ross/insane.tar.bz2
poky-contrib-ross/insane.zip
insane: move check_libdir to QAPKGTESTross/insane
-rw-r--r--meta/classes/insane.bbclass27
1 files changed, 5 insertions, 22 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index e77d875b46c..9afb18f9cab 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -275,7 +275,8 @@ def package_qa_check_staticdev(path, name, d, elf, messages):
messages["staticdev"] = "non -staticdev package contains static .a library: %s path '%s'" % \
(name, package_qa_clean_path(path,d))
-def package_qa_check_libdir(d):
+QAPKGTEST[libdir] = "package_qa_check_libdir"
+def package_qa_check_libdir(pkg, d, messages):
"""
Check for wrong library installation paths. For instance, catch
recipes installing /lib/bar.so when ${base_libdir}="lib32" or
@@ -283,26 +284,15 @@ def package_qa_check_libdir(d):
"""
import re
- pkgdest = d.getVar('PKGDEST', True)
+ pkgdest = os.path.join(d.getVar('PKGDEST', True), pkg)
base_libdir = d.getVar("base_libdir",True) + os.sep
libdir = d.getVar("libdir", True) + os.sep
exec_prefix = d.getVar("exec_prefix", True) + os.sep
- messages = []
-
lib_re = re.compile("^/lib.+\.so(\..+)?$")
exec_re = re.compile("^%s.*/lib.+\.so(\..+)?$" % exec_prefix)
for root, dirs, files in os.walk(pkgdest):
- if root == pkgdest:
- # Skip subdirectories for any packages with libdir in INSANE_SKIP
- skippackages = []
- for package in dirs:
- if 'libdir' in (d.getVar('INSANE_SKIP_' + package, True) or "").split():
- bb.note("Package %s skipping libdir QA test" % (package))
- skippackages.append(package)
- for package in skippackages:
- dirs.remove(package)
for file in files:
full_path = os.path.join(root, file)
rel_path = os.path.relpath(full_path, pkgdest)
@@ -311,13 +301,10 @@ def package_qa_check_libdir(d):
rel_path = os.sep + rel_path
if lib_re.match(rel_path):
if base_libdir not in rel_path:
- messages.append("%s: found library in wrong location: %s" % (package, rel_path))
+ messages["libdir"] = "%s: found library in wrong location: %s" % (pkg, rel_path)
if exec_re.match(rel_path):
if libdir not in rel_path:
- messages.append("%s: found library in wrong location: %s" % (package, rel_path))
-
- if messages:
- package_qa_handle_error("libdir", "\n".join(messages), d)
+ messages["libdir"] = "%s: found library in wrong location: %s" % (pkg, rel_path)
QAPATHTEST[debug-files] = "package_qa_check_dbg"
def package_qa_check_dbg(path, name, d, elf, messages):
@@ -1064,10 +1051,6 @@ python do_package_qa () {
if not package_qa_check_deps(package, pkgdest, skip, d):
deps_sane = False
-
- if 'libdir' in d.getVar("ALL_QA", True).split():
- package_qa_check_libdir(d)
-
qa_sane = d.getVar("QA_SANE", True)
if not walk_sane or not rdepends_sane or not deps_sane or not qa_sane:
bb.fatal("QA run found fatal errors. Please consider fixing them.")