]> code.ossystems Code Review - openembedded-core.git/commitdiff
utils.bbclass: add helper function to add all multilib variants of a specific package
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 5 Jul 2012 19:23:11 +0000 (14:23 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 9 Jul 2012 15:58:17 +0000 (16:58 +0100)
This is useful for the scenario where we want to add 'gcc' to
the root file system for all multilib variants

Signed-off-by: Matthew McClintock <msm@freescale.com>
meta/classes/utils.bbclass

index f8b09b423ca7afbcc55ebb216dc55812cf3ff3b3..ccf78fcfee99ae65d6cd72253927ea7a43b5546e 100644 (file)
@@ -325,6 +325,15 @@ def extend_variants(d, var, extend, delim=':'):
                        variants.append(eext[1])
        return " ".join(variants)
 
+def multilib_pkg_extend(d, pkg):
+       variants = (d.getVar("MULTILIB_VARIANTS", True) or "").split()
+       if not variants:
+           return pkg
+       pkgs = pkg
+       for v in variants:
+           pkgs = pkgs + " " + v + "-" + pkg
+       return pkgs
+
 def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' '):
        """Return a string of all ${var} in all multilib tune configuration"""
        values = []