summaryrefslogtreecommitdiffstats
path: root/meta/classes/insane.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r--meta/classes/insane.bbclass16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 0e974b5147..7680a59d64 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -40,6 +40,9 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
40 version-going-backwards expanded-d invalid-chars \ 40 version-going-backwards expanded-d invalid-chars \
41 license-checksum dev-elf file-rdeps \ 41 license-checksum dev-elf file-rdeps \
42 " 42 "
43# Add usrmerge QA check based on distro feature
44ERROR_QA_append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}"
45
43FAKEROOT_QA = "host-user-contaminated" 46FAKEROOT_QA = "host-user-contaminated"
44FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \ 47FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \
45enabled tests are listed here, the do_package_qa task will run under fakeroot." 48enabled tests are listed here, the do_package_qa task will run under fakeroot."
@@ -991,6 +994,18 @@ def package_qa_check_deps(pkg, pkgdest, skip, d):
991 check_valid_deps('RREPLACES') 994 check_valid_deps('RREPLACES')
992 check_valid_deps('RCONFLICTS') 995 check_valid_deps('RCONFLICTS')
993 996
997QAPKGTEST[usrmerge] = "package_qa_check_usrmerge"
998def package_qa_check_usrmerge(pkg, d, messages):
999 pkgdest = d.getVar('PKGDEST')
1000 pkg_dir = pkgdest + os.sep + pkg + os.sep
1001 merged_dirs = ['bin', 'sbin', 'lib'] + d.getVar('MULTILIB_VARIANTS').split()
1002 for f in merged_dirs:
1003 if os.path.exists(pkg_dir + f) and not os.path.islink(pkg_dir + f):
1004 msg = "%s package is not obeying usrmerge distro feature. /%s should be relocated to /usr." % (pkg, f)
1005 package_qa_add_message(messages, "usrmerge", msg)
1006 return False
1007 return True
1008
994QAPKGTEST[expanded-d] = "package_qa_check_expanded_d" 1009QAPKGTEST[expanded-d] = "package_qa_check_expanded_d"
995def package_qa_check_expanded_d(package, d, messages): 1010def package_qa_check_expanded_d(package, d, messages):
996 """ 1011 """
@@ -1064,6 +1079,7 @@ def package_qa_check_host_user(path, name, d, elf, messages):
1064 return False 1079 return False
1065 return True 1080 return True
1066 1081
1082
1067# The PACKAGE FUNC to scan each package 1083# The PACKAGE FUNC to scan each package
1068python do_package_qa () { 1084python do_package_qa () {
1069 import subprocess 1085 import subprocess