package.bbclass: enable the use of package_qa_handle_error
authorSaul Wold <sgw@linux.intel.com>
Tue, 3 Jul 2012 00:40:37 +0000 (17:40 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Jul 2012 16:40:35 +0000 (17:40 +0100)
This will allow the reporting of these errors as either WARNINGs (default)
or ERRORs if installed_vs_shipped is added to the ERROR_QA of the policy
file (such as a <distro_name>.conf file.

V2: found the code I had intended to send instead of that other junk,
    was just not watching what I pushed on that one, sorry. (this is edit in
    no in the actual commit message)

(From OE-Core rev: 20d4205a4e408b6a99db392d4df458156113106a)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass

index d94d32f..e6856cd 100644 (file)
@@ -988,9 +988,13 @@ python populate_packages () {
                                unshipped.append(path)
 
        if unshipped != []:
-               bb.warn("For recipe %s, the following files/directories were installed but not shipped in any package:" % pn)
-               for f in unshipped:
-                       bb.warn("  " + f)
+               msg = pn + ": Files/directories were installed but not shipped"
+               if "installed_vs_shipped" in (d.getVar('INSANE_SKIP_' + pn, True) or "").split():
+                       bb.note("Package %s skipping QA tests: installed_vs_shipped" % pn)
+               else:
+                       for f in unshipped:
+                               msg = msg + "\n  " + f  
+                       package_qa_handle_error("installed_vs_shipped", msg, d)
 
        bb.build.exec_func("package_name_hook", d)