]> code.ossystems Code Review - openembedded-core.git/commitdiff
insane.bbclass:buildpaths: ignore ipkg/dpkg's CONTROL dir
authorRobert Yang <liezhi.yang@windriver.com>
Tue, 19 Jan 2016 08:13:39 +0000 (00:13 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 22 Jan 2016 23:42:38 +0000 (23:42 +0000)
Fixed race issue when:
WARN_QA_append = " buildpaths"
PACKAGE_CLASSES = "package_ipk"
$ bitbake e2fsprogs

[snip]
 *** 0595:    with open(path) as f:
     0596:        file_content = f.read()
     0597:        if tmpdir in file_content:
     0598:            messages["buildpaths"] = "File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d)
     0599:
Exception: IOError: [Errno 2] No such file or directory: '/path/to/tmp/work/core2-64-poky-linux/e2fsprogs/1.42.9-r0/packages-split/e2fsprogs-ptest/CONTROL/control'

The similar to package_deb.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/insane.bbclass

index f7781ce6fecc2243ceeb4d63d636cf33f296e317..47988bd1e9af57df62ef27f8f2a008f51ca0e5b4 100644 (file)
@@ -585,6 +585,10 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
     if os.path.islink(path):
         return
 
+    # Ignore ipk and deb's CONTROL dir
+    if path.find(name + "/CONTROL/") != -1 or path.find(name + "/DEBIAN/") != -1:
+        return
+
     tmpdir = d.getVar('TMPDIR', True)
     with open(path) as f:
         file_content = f.read()