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:23:22 +0100 |
commit | f193729cdf0f3eccf96a8ce7bf5f599eca89a0d0 (patch) | |
tree | 3700b314af84ba7635ceb46c7e6b91b74284877f /meta/classes/multilib.bbclass | |
parent | 41ec6c1eb6998de6c1fd332510c1d71ba58f1b2c (diff) | |
download | openembedded-core-f193729cdf0f3eccf96a8ce7bf5f599eca89a0d0.tar.gz openembedded-core-f193729cdf0f3eccf96a8ce7bf5f599eca89a0d0.tar.bz2 openembedded-core-f193729cdf0f3eccf96a8ce7bf5f599eca89a0d0.tar.xz openembedded-core-f193729cdf0f3eccf96a8ce7bf5f599eca89a0d0.zip |
multilib.bbclass: Added multilib specific package QA.
Added a new PACKAGEFUNCS function to check the multilib packages'
dependency.
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/multilib.bbclass')
-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 c2d2f85a1..f3e7618c9 100644 --- a/meta/classes/multilib.bbclass +++ b/meta/classes/multilib.bbclass @@ -66,3 +66,34 @@ python __anonymous () { clsextend.map_variable("PACKAGE_INSTALL") clsextend.map_variable("INITSCRIPT_PACKAGES") } + +PACKAGEFUNCS_append = "do_package_qa_multilib" + +python do_package_qa_multilib() { + + def check_mlprefix(pkg, var, mlprefix): + values = bb.utils.explode_dep_versions(d.getVar('%s_%s' % (var, pkg), True) or d.getVar(var, True) or "") + candidates = [] + for i in values.keys(): + if i.startswith('virtual/'): + i = i[len('virtual/'):] + if (not i.startswith('kernel-module')) and (not i.startswith(mlprefix)): + candidates.append(i) + if len(candidates) > 0: + bb.warn("Multilib QA Issue: %s package %s - suspicious values '%s' in %s" + % (d.getVar('PN', True), pkg, ' '.join(candidates), var)) + + ml = d.getVar('MLPREFIX', True) + if not ml: + return + + packages = d.getVar('PACKAGES', True) + for pkg in packages.split(): + check_mlprefix(pkg, 'RDEPENDS', ml) + check_mlprefix(pkg, 'RPROVIDES', ml) + check_mlprefix(pkg, 'RRECOMMENDS', ml) + check_mlprefix(pkg, 'RSUGGESTS', ml) + check_mlprefix(pkg, 'RREPLACES', ml) + check_mlprefix(pkg, 'RCONFLICTS', ml) +} + |