summaryrefslogtreecommitdiff
path: root/classes/insane.bbclass
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2007-02-18 17:19:11 +0000
committerHolger Freyther <zecke@selfish.org>2007-02-18 17:19:11 +0000
commit80ed16db761962e949ef21ec10a9bc199c56cb61 (patch)
treef72ecd4c60636fd585230a220334a19bca454227 /classes/insane.bbclass
parentb4d163b526e513f0401ac94f9358c20988082451 (diff)
classes/insane.bbclass: Allow errors to be ignored
Add a method to implement koen's skipping of errors of type .so in non dev package. This will turn into a list of known and acked issues which we decided to ignore. I do not yet know how to maintain such a list properly though Split the .so in non-dev package and the .debug in non-dbg package into two different packages
Diffstat (limited to 'classes/insane.bbclass')
-rw-r--r--classes/insane.bbclass35
1 files changed, 30 insertions, 5 deletions
diff --git a/classes/insane.bbclass b/classes/insane.bbclass
index bf75496cd0..d11d8ddd7e 100644
--- a/classes/insane.bbclass
+++ b/classes/insane.bbclass
@@ -24,19 +24,41 @@ inherit package
PACKAGE_DEPENDS += "pax-utils-native"
PACKAGEFUNCS += " do_package_qa "
+#
+#
+# Known Error classes
+# 0 - non dev contains .so
+# 1 - package contains a dangerous RPATH
+# 2 - package depends on debug package
+# 3 - non dbg contains .so
+#
+#
+
def package_qa_clean_path(path,d):
import bb
return path.replace(bb.data.getVar('TMPDIR',d,True),"")
+def package_qa_make_fatal_error(error_class, name, path,d):
+ """
+ decide if an error is fatal
+
+ TODO: Load a whitelist of known errors
+ """
+ if error_class == 0:
+ return False
+ else:
+ return True
+
def package_qa_write_error(error_class, name, path, d):
import bb, os
if not bb.data.getVar('QA_LOG', d):
return
ERROR_NAMES =[
- "dev/dbg contains .so",
+ "non dev contains .so",
"package contains RPATH",
"package depends on debug package",
+ "non dbg contains .debug",
]
@@ -80,13 +102,15 @@ def package_qa_check_devdbg(path, name,d):
if path[-3:] == ".so":
package_qa_write_error( 0, name, path, d )
bb.error("QA Issue: non dev package contains .so: %s path '%s'" % (name, package_qa_clean_path(path,d)))
- sane = False
+ if package_qa_make_fatal_error( 0, name, path, d ):
+ sane = False
if not "-dbg" in name:
if '.debug' in path:
- package_qa_write_error( 0, name, path, d )
+ package_qa_write_error( 3, name, path, d )
bb.error("QA Issue: non debug package contains .debug directory: %s path %s" % (name, package_qa_clean_path(path,d)))
- sane = False
+ if package_qa_make_fatal_error( 3, name, path, d ):
+ sane = False
return sane
@@ -167,7 +191,8 @@ def package_qa_check_rdepends(pkg, workdir, d):
if "-dbg" in rdepend:
package_qa_write_error( 2, name, rdepend, d )
bb.error("QA issue, koen give us a better msg!!!")
- sane = False
+ if package_qa_make_fatal_error( 2, name, rdepend, d ):
+ sane = False
return sane