[oe-commits] org.oe.dev 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)
rpurdie commit
oe at amethyst.openembedded.net
Wed Mar 19 15:57:41 UTC 2008
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)
Author: rpurdie at openembedded.org
Branch: org.openembedded.dev
Revision: 8438ae3b4dcd083936783628f006b22c3e731b02
ViewMTN: http://monotone.openembedded.org/revision/info/8438ae3b4dcd083936783628f006b22c3e731b02
Files:
1
classes/insane.bbclass
Diffs:
#
# mt diff -r440982b14f1fd12b1e82ec3aaeb30d18b44722f3 -r8438ae3b4dcd083936783628f006b22c3e731b02
#
#
#
# patch "classes/insane.bbclass"
# from [0712df99743c442ed311e6b4d4be0d28f29d525f]
# to [5aba6b546fec93c59d7d0d9b7e30cdce39de2aa1]
#
============================================================
--- classes/insane.bbclass 0712df99743c442ed311e6b4d4be0d28f29d525f
+++ classes/insane.bbclass 5aba6b546fec93c59d7d0d9b7e30cdce39de2aa1
@@ -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,
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)
More information about the Openembedded-commits
mailing list