[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4165/8267] utils: Factor out common multilib datastore creation function
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 4165/8267] utils: Factor out common multilib datastore creation function
- Date: Sun, 17 Dec 2017 01:39:13 +0000 (UTC)
commit a49ee524a933b433ea9c2e2be1bbf24909fcde77
Author: Richard Purdie <richard purdie linuxfoundation org>
Date: Fri Jan 20 13:50:47 2017 +0000
utils: Factor out common multilib datastore creation function
This code is already used in two places and we need it in others so
turn it into its own function.
(From OE-Core rev: 2a57e1334ff261a7ab45084be0f217e2acfe99af)
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/utils.bbclass | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index d834a8a..549e4b8 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -349,6 +349,14 @@ def multilib_pkg_extend(d, pkg):
pkgs = pkgs + " " + v + "-" + pkg
return pkgs
+def get_multilib_datastore(variant, d):
+ localdata = bb.data.createCopy(d)
+ overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + variant
+ localdata.setVar("OVERRIDES", overrides)
+ localdata.setVar("MLPREFIX", variant + "-")
+ bb.data.update_data(localdata)
+ return localdata
+
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 = []
@@ -361,11 +369,7 @@ def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = '
values.append(value)
variants = d.getVar("MULTILIB_VARIANTS") or ""
for item in variants.split():
- localdata = bb.data.createCopy(d)
- overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
- localdata.setVar("OVERRIDES", overrides)
- localdata.setVar("MLPREFIX", item + "-")
- bb.data.update_data(localdata)
+ localdata = get_multilib_datastore(item, d)
value = localdata.getVar(var) or ""
if value != "":
if need_split:
@@ -411,11 +415,7 @@ def all_multilib_tune_list(vars, d):
values[v].append(localdata.getVar(v))
variants = d.getVar("MULTILIB_VARIANTS") or ""
for item in variants.split():
- localdata = bb.data.createCopy(d)
- overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
- localdata.setVar("OVERRIDES", overrides)
- localdata.setVar("MLPREFIX", item + "-")
- bb.data.update_data(localdata)
+ localdata = get_multilib_datastore(item, d)
values[v].append(localdata.getVar(v))
values['ml'].append(item)
return values
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]