]> code.ossystems Code Review - openembedded-core.git/commitdiff
insane: improve buildpath warning messages
authorRoss Burton <ross.burton@intel.com>
Tue, 18 Jun 2019 10:43:43 +0000 (11:43 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 18 Jun 2019 14:55:59 +0000 (15:55 +0100)
Instead of reporting large chunks of the work directory and not the package
name:

"File /work/corei7-64-poky-linux/libidn2/2.2.0-r0/packages-split/libidn2-dev/usr/lib/pkgconfig/libidn2.pc in package contained reference to tmpdir"

We can clean up the paths and be more useful:

"File /usr/lib/pkgconfig/libidn2.pc in package libidn2-dev contains reference to TMPDIR"

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/insane.bbclass

index fdc20c41a52fe180ea79b88ea120ed31195a0cf4..0fb5fee0613a614e613d0dd4ec68ad07bc666c97 100644 (file)
@@ -408,7 +408,8 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
     with open(path, 'rb') as f:
         file_content = f.read()
         if tmpdir in file_content:
-            package_qa_add_message(messages, "buildpaths", "File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d))
+            trimmed = path.replace(os.path.join (d.getVar("PKGDEST"), name), "")
+            package_qa_add_message(messages, "buildpaths", "File %s in package %s contains reference to TMPDIR" % (trimmed, name))
 
 
 QAPATHTEST[xorg-driver-abi] = "package_qa_check_xorg_driver_abi"