summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-07-14 23:14:32 -0700
committerRobert Yang <liezhi.yang@windriver.com>2015-09-15 19:23:59 -0700
commit6f49ee1c3fac0a39d8976d7c74000ad507031516 (patch)
tree3b48aefd611594935b5ef34af1aca17f3e1585bb
parent4295d930d43211a0a4da0dee7a62473247b56204 (diff)
downloadopenembedded-core-contrib-6f49ee1c3fac0a39d8976d7c74000ad507031516.tar.gz
openembedded-core-contrib-6f49ee1c3fac0a39d8976d7c74000ad507031516.tar.bz2
openembedded-core-contrib-6f49ee1c3fac0a39d8976d7c74000ad507031516.zip
insane.bbclass: fix package_qa_check_buildpaths
* Ignore elf files because they usually contain build path: - The path of the source file such as .c, these are usually happen when separate B and S since we use absolute path to run configure script, and then VPATH in Makefile will be an absolute path and contains build path, we can use relative path in autotools.bbclass to fix the problem, but we don't have to since they are harmless. - The configure options such as "configure --with-libtool-sysroot" - The compile options such as "gcc --sysroot" These are harmless usually, so ignore elf files. * Ignore "-dbg" and "-staticdev" package since symbols and .a files usually contain buildpath. * Ignore .a files too since they contain buildpath, this mainly for ignoring: glibc-2.21: glibc-dev/usr/lib/libc_nonshared.a libgcc-4.9.3: libgcc-dev/usr/lib/x86_64-poky-linux/4.9.3/libgcc_eh.a gcc-runtime-4.9.3: libssp-dev/usr/lib/libssp_nonshared.a * Use full path rather than package_qa_clean_path() when report issue, this makes it easier to find the file and fix the problem. Then we will verify other warings and fix one be one. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-rw-r--r--meta/classes/insane.bbclass12
1 files changed, 9 insertions, 3 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 5c8629af1d..943ada83c8 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -571,8 +571,14 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
"""
Check for build paths inside target files and error if not found in the whitelist
"""
- # Ignore .debug files, not interesting
- if path.find(".debug") != -1:
+
+ # Ignore staticdev and debug files since symbols and .a usually
+ # contain buildpath.
+ if name.endswith("-dbg") or name.endswith("-staticdev"):
+ return
+
+ # Ignore elf and .a files
+ if elf or path.endswith('.a'):
return
# Ignore symlinks
@@ -583,7 +589,7 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
with open(path) as f:
file_content = f.read()
if tmpdir in file_content:
- messages["buildpaths"] = "File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d)
+ messages["buildpaths"] = "File %s in package contained reference to tmpdir" % path
QAPATHTEST[xorg-driver-abi] = "package_qa_check_xorg_driver_abi"