mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
insane.bbclass: validate desktop files
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3151 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
# We play a special package function
|
# We play a special package function
|
||||||
inherit package
|
inherit package
|
||||||
PACKAGE_DEPENDS += "pax-utils-native"
|
PACKAGE_DEPENDS += "pax-utils-native desktop-file-utils-native"
|
||||||
#PACKAGE_DEPENDS += chrpath-native"
|
#PACKAGE_DEPENDS += chrpath-native"
|
||||||
PACKAGEFUNCS += " do_package_qa "
|
PACKAGEFUNCS += " do_package_qa "
|
||||||
|
|
||||||
@@ -308,8 +308,19 @@ def package_qa_check_pcla(path,name,d):
|
|||||||
.pc and .la files should not point to the WORKDIR
|
.pc and .la files should not point to the WORKDIR
|
||||||
"""
|
"""
|
||||||
sane = True
|
sane = True
|
||||||
|
# TODO
|
||||||
return sane
|
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')
|
||||||
|
os.system ("%s %s" % (validate, path))
|
||||||
|
return True
|
||||||
|
|
||||||
def package_qa_check_staged(path,d):
|
def package_qa_check_staged(path,d):
|
||||||
"""
|
"""
|
||||||
Check staged la and pc files for sanity
|
Check staged la and pc files for sanity
|
||||||
@@ -422,7 +433,7 @@ python do_package_qa () {
|
|||||||
|
|
||||||
bb.note("Checking Package: %s" % package)
|
bb.note("Checking Package: %s" % package)
|
||||||
path = "%s/install/%s" % (workdir, 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
|
walk_sane = False
|
||||||
if not package_qa_check_rdepends(package, workdir, d):
|
if not package_qa_check_rdepends(package, workdir, d):
|
||||||
rdepends_sane = False
|
rdepends_sane = False
|
||||||
|
|||||||
Reference in New Issue
Block a user