diff options
author | Lianhao Lu <lianhao.lu@intel.com> | 2012-05-18 17:18:13 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-18 15:25:11 +0100 |
commit | f3c07ace4b8a41c3ee265ab257c1ad1cb8ee656b (patch) | |
tree | 4f6b1a3615ea0d3d557ee2bd96409a5d292694db | |
parent | 0b2bbdaab10a16e27b935eab68f8d7a185f196ce (diff) | |
download | poky-f3c07ace4b8a41c3ee265ab257c1ad1cb8ee656b.tar.gz |
multilib.bbclass: Added multilib specific package QA.
Added a new PACKAGEFUNCS function to check the multilib packages'
dependency.
(From OE-Core rev: f193729cdf0f3eccf96a8ce7bf5f599eca89a0d0)
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/multilib.bbclass | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass index c2d2f85a12..f3e7618c95 100644 --- a/meta/classes/multilib.bbclass +++ b/meta/classes/multilib.bbclass | |||
@@ -66,3 +66,34 @@ python __anonymous () { | |||
66 | clsextend.map_variable("PACKAGE_INSTALL") | 66 | clsextend.map_variable("PACKAGE_INSTALL") |
67 | clsextend.map_variable("INITSCRIPT_PACKAGES") | 67 | clsextend.map_variable("INITSCRIPT_PACKAGES") |
68 | } | 68 | } |
69 | |||
70 | PACKAGEFUNCS_append = "do_package_qa_multilib" | ||
71 | |||
72 | python do_package_qa_multilib() { | ||
73 | |||
74 | def check_mlprefix(pkg, var, mlprefix): | ||
75 | values = bb.utils.explode_dep_versions(d.getVar('%s_%s' % (var, pkg), True) or d.getVar(var, True) or "") | ||
76 | candidates = [] | ||
77 | for i in values.keys(): | ||
78 | if i.startswith('virtual/'): | ||
79 | i = i[len('virtual/'):] | ||
80 | if (not i.startswith('kernel-module')) and (not i.startswith(mlprefix)): | ||
81 | candidates.append(i) | ||
82 | if len(candidates) > 0: | ||
83 | bb.warn("Multilib QA Issue: %s package %s - suspicious values '%s' in %s" | ||
84 | % (d.getVar('PN', True), pkg, ' '.join(candidates), var)) | ||
85 | |||
86 | ml = d.getVar('MLPREFIX', True) | ||
87 | if not ml: | ||
88 | return | ||
89 | |||
90 | packages = d.getVar('PACKAGES', True) | ||
91 | for pkg in packages.split(): | ||
92 | check_mlprefix(pkg, 'RDEPENDS', ml) | ||
93 | check_mlprefix(pkg, 'RPROVIDES', ml) | ||
94 | check_mlprefix(pkg, 'RRECOMMENDS', ml) | ||
95 | check_mlprefix(pkg, 'RSUGGESTS', ml) | ||
96 | check_mlprefix(pkg, 'RREPLACES', ml) | ||
97 | check_mlprefix(pkg, 'RCONFLICTS', ml) | ||
98 | } | ||
99 | |||