[oe-commits] org.oe.dev insane.bbclass: merge dot desktop check from poky
koen commit
openembedded-commits at lists.openembedded.org
Wed Nov 14 18:17:46 UTC 2007
insane.bbclass: merge dot desktop check from poky
Author: koen at openembedded.org
Branch: org.openembedded.dev
Revision: 94fb88049d8aea8313c398d3df50af2d4646f619
ViewMTN: http://monotone.openembedded.org/revision/info/94fb88049d8aea8313c398d3df50af2d4646f619
Files:
1
classes/insane.bbclass
Diffs:
#
# mt diff -r22ffaff41bff4b4c9dc6be8525a6c6782292cff4 -r94fb88049d8aea8313c398d3df50af2d4646f619
#
#
#
# patch "classes/insane.bbclass"
# from [2b43994e2dd8ae85f612788e116ce44c9b31619d]
# to [969f0ea4a41bb686333bda84032d4f9250a61c3b]
#
============================================================
--- classes/insane.bbclass 2b43994e2dd8ae85f612788e116ce44c9b31619d
+++ classes/insane.bbclass 969f0ea4a41bb686333bda84032d4f9250a61c3b
@@ -21,7 +21,7 @@ inherit package
# We play a special package function
inherit package
-PACKAGE_DEPENDS += "pax-utils-native"
+PACKAGE_DEPENDS += "pax-utils-native desktop-file-utils-native"
#PACKAGE_DEPENDS += chrpath-native"
PACKAGEFUNCS += " do_package_qa "
@@ -308,8 +308,22 @@ def package_qa_check_pcla(path,name,d):
.pc and .la files should not point to the WORKDIR
"""
sane = True
+ # TODO
return sane
+def package_qa_check_desktop(path, name, d):
+ """
+ Run all desktop files through desktop-file-validate.
+ """
+ import bb, os
+ 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))
+ # This only produces output on errors
+ for l in output:
+ bb.error(l.strip())
+ return True
+
def package_qa_check_staged(path,d):
"""
Check staged la and pc files for sanity
@@ -416,9 +430,13 @@ python do_package_qa () {
walk_sane = True
rdepends_sane = True
for package in packages.split():
+ if bb.data.getVar('INSANE_SKIP_' + package, d, True):
+ bb.note("Package: %s (skipped)" % package)
+ continue
+
bb.note("Checking Package: %s" % package)
path = "%s/install/%s" % (workdir, package)
- if not package_qa_walk(path, [package_qa_check_rpath, package_qa_check_devdbg, package_qa_check_perm, package_qa_check_arch], package, d):
+ if not package_qa_walk(path, [package_qa_check_rpath, package_qa_check_devdbg, package_qa_check_perm, package_qa_check_arch, package_qa_check_desktop], package, d):
walk_sane = False
if not package_qa_check_rdepends(package, workdir, d):
rdepends_sane = False
More information about the Openembedded-commits
mailing list