diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2008-03-19 15:55:45 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2008-03-19 15:55:45 +0000 |
commit | 70ea14f38a343e24c2ab685044ec3c508bfa53cc (patch) | |
tree | ab0940c76030e1ff9e21ef737d3b57bbb338201b /classes | |
parent | 084a36147a921de7a216a62eea682e65a89b303d (diff) |
insane.bbclass: Only check installed status for packages which aren't native/cross, find desktop-file-validate from PATH so it can be ASSUME_PROVIDED (from poky)
Diffstat (limited to 'classes')
-rw-r--r-- | classes/insane.bbclass | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 5ff49cd65e..2ef5527dac 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -162,7 +162,7 @@ def package_qa_get_elf(path, bits32): # 2 - package depends on debug package # 3 - non dbg contains .so # 4 - wrong architecture -# 5 - .la contains installed=yes +# 5 - .la contains installed=yes or reference to the workdir # 6 - .pc contains reference to /usr/include or workdir # 7 - the desktop file is not valid # 8 - .la contains reference to the workdir @@ -313,9 +313,8 @@ def package_qa_check_desktop(path, name, d): import bb, os sane = True if path.endswith(".desktop"): - validate = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True), \ - 'desktop-file-validate') - output = os.popen("%s %s" % (validate, path)) + output = os.popen("desktop-file-validate %s" % path) + # This only produces output on errors for l in output: sane = package_qa_handle_error(7, l.strip(), name, path, d) @@ -336,11 +335,10 @@ def package_qa_check_staged(path,d): tmpdir = bb.data.getVar('TMPDIR', d, True) workdir = os.path.join(tmpdir, "work") + installed = "installed=yes" if bb.data.inherits_class("native", d) or bb.data.inherits_class("cross", d): - installed = "installed=no" pkgconfigcheck = workdir else: - installed = "installed=yes" pkgconfigcheck = tmpdir # find all .la and .pc files @@ -351,9 +349,11 @@ def package_qa_check_staged(path,d): path = os.path.join(root,file) if file[-2:] == "la": file_content = open(path).read() - if installed in file_content: - error_msg = "%s failed sanity test (installed) in path %s" % (file,root) - sane = package_qa_handle_error(5, error_msg, "staging", path, d) + # Don't check installed status for native/cross packages + if not bb.data.inherits_class("native", d) and not bb.data.inherits_class("cross", d): + if installed in file_content: + error_msg = "%s failed sanity test (installed) in path %s" % (file,root) + sane = package_qa_handle_error(5, error_msg, "staging", path, d) if workdir in file_content: error_msg = "%s failed sanity test (workdir) in path %s" % (file,root) sane = package_qa_handle_error(8, error_msg, "staging", path, d) |