From patchwork Mon Aug 13 21:15:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [23/32] utils.bbclass: add helper function to add all multilib variants of a specific package Date: Mon, 13 Aug 2012 21:15:04 -0000 From: Scott Garman X-Patchwork-Id: 34431 Message-Id: To: openembedded-core@lists.openembedded.org From: Richard Purdie 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 Signed-off-by: Richard Purdie --- meta/classes/utils.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass index fde8f44..cc3acfa 100644 --- a/meta/classes/utils.bbclass +++ b/meta/classes/utils.bbclass @@ -351,6 +351,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 = []