[gnome-continuous-yocto/gnomeostree-3.28-rocko: 6626/8267] insane.bbclass: Add package QA check for merged /usr.
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 6626/8267] insane.bbclass: Add package QA check for merged /usr.
- Date: Sun, 17 Dec 2017 05:06:33 +0000 (UTC)
commit 2ea87f74da88566c2c8017dbd545632f7acea4fd
Author: Amarnath Valluri <amarnath valluri intel com>
Date: Wed Jun 14 14:30:46 2017 +0300
insane.bbclass: Add package QA check for merged /usr.
This check makes sure that, when usrmerge distro feature enabled, no package
installs files to root (/bin, /sbin, /lib, /lib64) folders.
(From OE-Core rev: 9f52f9f60f5680d7a824dafb3334de624eceed4c)
Signed-off-by: Amarnath Valluri <amarnath valluri intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/insane.bbclass | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 0e974b5..7680a59 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 \
version-going-backwards expanded-d invalid-chars \
license-checksum dev-elf file-rdeps \
"
+# Add usrmerge QA check based on distro feature
+ERROR_QA_append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}"
+
FAKEROOT_QA = "host-user-contaminated"
FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \
enabled 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):
check_valid_deps('RREPLACES')
check_valid_deps('RCONFLICTS')
+QAPKGTEST[usrmerge] = "package_qa_check_usrmerge"
+def package_qa_check_usrmerge(pkg, d, messages):
+ pkgdest = d.getVar('PKGDEST')
+ pkg_dir = pkgdest + os.sep + pkg + os.sep
+ merged_dirs = ['bin', 'sbin', 'lib'] + d.getVar('MULTILIB_VARIANTS').split()
+ for f in merged_dirs:
+ if os.path.exists(pkg_dir + f) and not os.path.islink(pkg_dir + f):
+ msg = "%s package is not obeying usrmerge distro feature. /%s should be relocated to /usr." %
(pkg, f)
+ package_qa_add_message(messages, "usrmerge", msg)
+ return False
+ return True
+
QAPKGTEST[expanded-d] = "package_qa_check_expanded_d"
def package_qa_check_expanded_d(package, d, messages):
"""
@@ -1064,6 +1079,7 @@ def package_qa_check_host_user(path, name, d, elf, messages):
return False
return True
+
# The PACKAGE FUNC to scan each package
python do_package_qa () {
import subprocess
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]