]> code.ossystems Code Review - openembedded-core.git/commitdiff
multilib: skip packages that provide virtual/kernel
authorBruce Ashfield <bruce.ashfield@windriver.com>
Thu, 31 Jan 2013 18:31:04 +0000 (13:31 -0500)
committerRoss Burton <ross.burton@intel.com>
Tue, 30 Apr 2013 10:06:16 +0000 (11:06 +0100)
Rather than keying on recipes that inherit kernel.bbclass, we should
be checking for providers of virtual/kernel when skipping kernel
recipes in multlib builds.

Not all providers of virtual/kernel inherit kernel.bbclass (notably
linux-dummy), so checking on the provider is a more complete check.

We need to be sure to check for inheritance of module-base as well, this
allows for packages that provides modules to avoid the multilib renaming.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/multilib.bbclass
meta/lib/oe/classextend.py

index 3824f3b1177669ceb5b8c383b9b288cd0d175913..3f271960b312d6012ff43b4ff1ee5465c941e55b 100644 (file)
@@ -10,7 +10,9 @@ python multilib_virtclass_handler () {
     e.data.setVar('STAGING_KERNEL_DIR', e.data.getVar('STAGING_KERNEL_DIR', True))
 
     # There should only be one kernel in multilib configs
-    if bb.data.inherits_class('kernel', e.data) or bb.data.inherits_class('module-base', e.data):
+    # We also skip multilib setup for module packages.
+    provides = (e.data.getVar("PROVIDES", True) or "").split()
+    if "virtual/kernel" in provides or bb.data.inherits_class('module-base', e.data):
         raise bb.parse.SkipPackage("We shouldn't have multilib variants for the kernel")
 
     if bb.data.inherits_class('image', e.data):
index fe9b566e7cb33b9396abd63322c0cdff0189f020..a45df3a98b0ecb222a6cef4b3346c38f83a064b0 100644 (file)
@@ -5,7 +5,7 @@ class ClassExtender(object):
         self.pkgs_mapping = []
 
     def extend_name(self, name):
-        if name.startswith("kernel-module"):
+        if name.startswith("kernel-module") or name == "virtual/kernel":
             return name
         if name.startswith("rtld"):
             return name