utils.bbclass: add helper function to add all multilib variants of a specific package

This is useful for the scenario where we want to add 'gcc' to
the root file system for all multilib variants

(From OE-Core rev: 7cd54693363882854cd026ebe071e9f2e03d364e)

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2012-07-05 14:23:11 -05:00
parent fe5feba665
commit 2717309501
1 changed files with 9 additions and 0 deletions

View 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 = []