summaryrefslogtreecommitdiff
path: root/meta/classes/utils.bbclass
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2011-08-16 16:26:49 +0800
committerSaul Wold <sgw@linux.intel.com>2011-08-16 22:54:04 -0700
commitb774bf44ef004276da12a83ebd69715c00b596ac (patch)
tree320290988559a45b0688fd0c51b768cef4585ec5 /meta/classes/utils.bbclass
parent110ca8dcaee263bc3c8380bcb91f6ada20655c14 (diff)
downloadopenembedded-core-b774bf44ef004276da12a83ebd69715c00b596ac.tar.gz
openembedded-core-b774bf44ef004276da12a83ebd69715c00b596ac.tar.bz2
openembedded-core-b774bf44ef004276da12a83ebd69715c00b596ac.zip
package(_ipk).bbclass: opkg using ALL_MULTILIB_PACKAGE_ARCHS
[YOCTO #1345] The new variable ALL_MULTILIB_PACKAGE_ARCHS contains all the values of PACKAGE_ARCHS for each multilib variants. The opkg backend now uses this new value insteald of the PACKAGE_ARCHS to update the opkg indexes and to generate the opkg configuration files. This allows the normal packages and multilib packages may be installed into the same rootfs. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Diffstat (limited to 'meta/classes/utils.bbclass')
-rw-r--r--meta/classes/utils.bbclass24
1 files changed, 19 insertions, 5 deletions
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index c66c18449a..56abdd844c 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -352,12 +352,16 @@ def extend_variants(d, var, extend, delim=':'):
variants.append(eext[1])
return " ".join(variants)
-def all_multilib_tune_values(d, var, unique=True):
+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 = []
value = d.getVar(var, True) or ""
if value != "":
- values.append(value)
+ if need_split:
+ for item in value.split(delim):
+ values.append(item)
+ else:
+ values.append(value)
variants = d.getVar("MULTILIB_VARIANTS", True) or ""
for item in variants.split():
localdata = bb.data.createCopy(d)
@@ -366,7 +370,17 @@ def all_multilib_tune_values(d, var, unique=True):
bb.data.update_data(localdata)
value = localdata.getVar(var, True) or ""
if value != "":
- values.append(value)
+ if need_split:
+ for item in value.split(delim):
+ values.append(item)
+ else:
+ values.append(value)
if unique:
- values = set(values)
- return " ".join(values)
+ #we do this to keep order as much as possible
+ ret = []
+ for value in values:
+ if not value in ret:
+ ret.append(value)
+ else:
+ ret = values
+ return " ".join(ret)