diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/multilib.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/multilib_global.bbclass | 5 | ||||
-rw-r--r-- | meta/lib/oe/packagedata.py | 42 |
3 files changed, 35 insertions, 14 deletions
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass index 7d5fc41535..76cbac6d6a 100644 --- a/meta/classes/multilib.bbclass +++ b/meta/classes/multilib.bbclass | |||
@@ -36,8 +36,6 @@ python multilib_virtclass_handler () { | |||
36 | e.data.setVar("MLPREFIX", variant + "-") | 36 | e.data.setVar("MLPREFIX", variant + "-") |
37 | e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False)) | 37 | e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False)) |
38 | e.data.setVar("SHLIBSDIR_virtclass-multilib-" + variant ,e.data.getVar("SHLIBSDIR", False) + "/" + variant) | 38 | e.data.setVar("SHLIBSDIR_virtclass-multilib-" + variant ,e.data.getVar("SHLIBSDIR", False) + "/" + variant) |
39 | if e.data.getVar("TARGET_VENDOR_virtclass-multilib-" + variant, False) is None: | ||
40 | e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + variant, e.data.getVar("TARGET_VENDOR", False) + "ml" + variant) | ||
41 | e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override) | 39 | e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override) |
42 | } | 40 | } |
43 | 41 | ||
diff --git a/meta/classes/multilib_global.bbclass b/meta/classes/multilib_global.bbclass index b76fd94162..f55e3a25aa 100644 --- a/meta/classes/multilib_global.bbclass +++ b/meta/classes/multilib_global.bbclass | |||
@@ -2,6 +2,11 @@ python multilib_virtclass_handler_global () { | |||
2 | if not e.data: | 2 | if not e.data: |
3 | return | 3 | return |
4 | 4 | ||
5 | if isinstance(e, bb.event.RecipePreFinalise): | ||
6 | for v in e.data.getVar("MULTILIB_VARIANTS", True).split(): | ||
7 | if e.data.getVar("TARGET_VENDOR_virtclass-multilib-" + v, False) is None: | ||
8 | e.data.setVar("TARGET_VENDOR_virtclass-multilib-" + v, e.data.getVar("TARGET_VENDOR", False) + "ml" + v) | ||
9 | |||
5 | variant = e.data.getVar("BBEXTENDVARIANT", True) | 10 | variant = e.data.getVar("BBEXTENDVARIANT", True) |
6 | 11 | ||
7 | if isinstance(e, bb.event.RecipeParsed) and not variant: | 12 | if isinstance(e, bb.event.RecipeParsed) and not variant: |
diff --git a/meta/lib/oe/packagedata.py b/meta/lib/oe/packagedata.py index 5f897ff31f..ce92a7ef8e 100644 --- a/meta/lib/oe/packagedata.py +++ b/meta/lib/oe/packagedata.py | |||
@@ -23,21 +23,39 @@ def read_pkgdatafile(fn): | |||
23 | 23 | ||
24 | return pkgdata | 24 | return pkgdata |
25 | 25 | ||
26 | def all_pkgdatadirs(d): | ||
27 | archs = [] | ||
28 | tos = [] | ||
29 | tvs = [] | ||
30 | |||
31 | archs.append(d.getVar("PACKAGE_ARCHS", True).split()) | ||
32 | tos.append(d.getVar("TARGET_OS", True)) | ||
33 | tvs.append(d.getVar("TARGET_VENDOR", True)) | ||
34 | |||
35 | variants = d.getVar("MULTILIB_VARIANTS", True) or "" | ||
36 | for item in variants.split(): | ||
37 | localdata = bb.data.createCopy(d) | ||
38 | overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item | ||
39 | localdata.setVar("OVERRIDES", overrides) | ||
40 | bb.data.update_data(localdata) | ||
41 | |||
42 | archs.append(localdata.getVar("PACKAGE_ARCHS", True).split()) | ||
43 | tos.append(localdata.getVar("TARGET_OS", True)) | ||
44 | tvs.append(localdata.getVar("TARGET_VENDOR", True)) | ||
45 | |||
46 | dirs = [] | ||
47 | for i in range(len(archs)): | ||
48 | for arch in archs[i]: | ||
49 | dirs.append(arch + tvs[i] + "-" + tos[i] + "/runtime/") | ||
50 | dirs.reverse() | ||
51 | return dirs | ||
52 | |||
26 | def get_subpkgedata_fn(pkg, d): | 53 | def get_subpkgedata_fn(pkg, d): |
27 | archs = d.expand("${PACKAGE_ARCHS}").split(" ") | 54 | dirs = all_pkgdatadirs(d) |
28 | mlarchs = d.getVar("MULTILIB_PACKAGE_ARCHS", d) or None | ||
29 | 55 | ||
30 | if mlarchs: | ||
31 | for mlarch in mlarchs.split(" "): | ||
32 | if "_" in mlarch: | ||
33 | prefix, split, new_arch = mlarch.partition("_") | ||
34 | archs.append(new_arch) | ||
35 | |||
36 | archs.reverse() | ||
37 | pkgdata = d.expand('${TMPDIR}/pkgdata/') | 56 | pkgdata = d.expand('${TMPDIR}/pkgdata/') |
38 | targetdir = d.expand('${TARGET_VENDOR}-${TARGET_OS}/runtime/') | 57 | for dir in dirs: |
39 | for arch in archs: | 58 | fn = pkgdata + dir + pkg |
40 | fn = pkgdata + arch + targetdir + pkg | ||
41 | if os.path.exists(fn): | 59 | if os.path.exists(fn): |
42 | return fn | 60 | return fn |
43 | return d.expand('${PKGDATA_DIR}/runtime/%s' % pkg) | 61 | return d.expand('${PKGDATA_DIR}/runtime/%s' % pkg) |