diff options
| author | Lianhao Lu <lianhao.lu@intel.com> | 2011-08-16 16:26:49 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-17 15:14:56 +0100 |
| commit | 57bd62ad5c623216b50393841e1e75c867894765 (patch) | |
| tree | ed020390a1f8c9839b61982d0c0453f60233df81 /meta/classes/utils.bbclass | |
| parent | f759bde4f7c3a0f82a0a910df2ead755ae989ac2 (diff) | |
| download | poky-57bd62ad5c623216b50393841e1e75c867894765.tar.gz | |
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.
(From OE-Core rev: b774bf44ef004276da12a83ebd69715c00b596ac)
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/utils.bbclass')
| -rw-r--r-- | meta/classes/utils.bbclass | 24 |
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=':'): | |||
| 352 | variants.append(eext[1]) | 352 | variants.append(eext[1]) |
| 353 | return " ".join(variants) | 353 | return " ".join(variants) |
| 354 | 354 | ||
| 355 | def all_multilib_tune_values(d, var, unique=True): | 355 | def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' '): |
| 356 | """Return a string of all ${var} in all multilib tune configuration""" | 356 | """Return a string of all ${var} in all multilib tune configuration""" |
| 357 | values = [] | 357 | values = [] |
| 358 | value = d.getVar(var, True) or "" | 358 | value = d.getVar(var, True) or "" |
| 359 | if value != "": | 359 | if value != "": |
| 360 | values.append(value) | 360 | if need_split: |
| 361 | for item in value.split(delim): | ||
| 362 | values.append(item) | ||
| 363 | else: | ||
| 364 | values.append(value) | ||
| 361 | variants = d.getVar("MULTILIB_VARIANTS", True) or "" | 365 | variants = d.getVar("MULTILIB_VARIANTS", True) or "" |
| 362 | for item in variants.split(): | 366 | for item in variants.split(): |
| 363 | localdata = bb.data.createCopy(d) | 367 | localdata = bb.data.createCopy(d) |
| @@ -366,7 +370,17 @@ def all_multilib_tune_values(d, var, unique=True): | |||
| 366 | bb.data.update_data(localdata) | 370 | bb.data.update_data(localdata) |
| 367 | value = localdata.getVar(var, True) or "" | 371 | value = localdata.getVar(var, True) or "" |
| 368 | if value != "": | 372 | if value != "": |
| 369 | values.append(value) | 373 | if need_split: |
| 374 | for item in value.split(delim): | ||
| 375 | values.append(item) | ||
| 376 | else: | ||
| 377 | values.append(value) | ||
| 370 | if unique: | 378 | if unique: |
| 371 | values = set(values) | 379 | #we do this to keep order as much as possible |
| 372 | return " ".join(values) | 380 | ret = [] |
| 381 | for value in values: | ||
| 382 | if not value in ret: | ||
| 383 | ret.append(value) | ||
| 384 | else: | ||
| 385 | ret = values | ||
| 386 | return " ".join(ret) | ||
