diff options
author | Constantin Musca <constantinx.musca@intel.com> | 2012-12-24 13:28:38 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-31 09:43:25 +0000 |
commit | 1674541ed83fa4645f2e078f65fe0f878527ee6e (patch) | |
tree | 3b0b2c5ce95eee3090f05058e52369490852fef4 /meta/classes/package.bbclass | |
parent | 415c4fa12c83dacc6b107d0f857ea299a68b0eca (diff) | |
download | poky-1674541ed83fa4645f2e078f65fe0f878527ee6e.tar.gz |
multilib: fix allarch/kernel/module-base multilib issues
- skip the non-packagegroup allarch recipes in multilib_virtclass_handler
- extend PROVIDES/RPROVIDES for allarch recipes which are not packagegroups
- use variants from MULTILIB_GLOBAL_VARIANTS (lib32 lib64 libx32) to create
additional pkgdata files for multilib allarch: ${pkgdatadir}/${variant}-${PN}
and ${pkgdatadir}/runtime/${variant}-${pkg}
- use variants from MULTILIB_VARIANTS to create additional pkgdata files
for multilib kernel/module-base recipes
- add a sanity check to determine if the current multilib is in
MULTILIB_GLOBAL_VARIANTS
[YOCTO #2918]
[YOCTO #3440]
[YOCTO #3565]
[YOCTO #3568]
(From OE-Core rev: bc4da2573dfb59ea2fc4af359701818df20f7663)
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 9885d94101..1ac65510c7 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -1132,6 +1132,20 @@ python emit_pkgdata() { | |||
1132 | size = 0 | 1132 | size = 0 |
1133 | return size | 1133 | return size |
1134 | 1134 | ||
1135 | def write_extra_pkgs(variants, pn, packages, pkgdatadir): | ||
1136 | for variant in variants: | ||
1137 | with open("%s/%s-%s" % (pkgdatadir, variant, pn), 'w') as fd: | ||
1138 | fd.write("PACKAGES: %s\n" % ' '.join( | ||
1139 | map(lambda pkg: '%s-%s' % (variant, pkg), packages.split()))) | ||
1140 | |||
1141 | def write_extra_runtime_pkgs(variants, packages, pkgdatadir): | ||
1142 | for variant in variants: | ||
1143 | for pkg in packages.split(): | ||
1144 | ml_pkg = "%s-%s" % (variant, pkg) | ||
1145 | subdata_file = "%s/runtime/%s" % (pkgdatadir, ml_pkg) | ||
1146 | with open(subdata_file, 'w') as fd: | ||
1147 | fd.write("PKG_%s: %s" % (ml_pkg, pkg)) | ||
1148 | |||
1135 | packages = d.getVar('PACKAGES', True) | 1149 | packages = d.getVar('PACKAGES', True) |
1136 | pkgdest = d.getVar('PKGDEST', True) | 1150 | pkgdest = d.getVar('PKGDEST', True) |
1137 | pkgdatadir = d.getVar('PKGDESTWORK', True) | 1151 | pkgdatadir = d.getVar('PKGDESTWORK', True) |
@@ -1144,6 +1158,16 @@ python emit_pkgdata() { | |||
1144 | f.write("PACKAGES: %s\n" % packages) | 1158 | f.write("PACKAGES: %s\n" % packages) |
1145 | f.close() | 1159 | f.close() |
1146 | 1160 | ||
1161 | pn = d.getVar('PN', True) | ||
1162 | global_variants = (d.getVar('MULTILIB_GLOBAL_VARIANTS', True) or "").split() | ||
1163 | variants = (d.getVar('MULTILIB_VARIANTS', True) or "").split() | ||
1164 | |||
1165 | if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d): | ||
1166 | write_extra_pkgs(variants, pn, packages, pkgdatadir) | ||
1167 | |||
1168 | if (bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d)): | ||
1169 | write_extra_pkgs(global_variants, pn, packages, pkgdatadir) | ||
1170 | |||
1147 | workdir = d.getVar('WORKDIR', True) | 1171 | workdir = d.getVar('WORKDIR', True) |
1148 | 1172 | ||
1149 | for pkg in packages.split(): | 1173 | for pkg in packages.split(): |
@@ -1198,6 +1222,12 @@ python emit_pkgdata() { | |||
1198 | packagedfile = pkgdatadir + '/runtime/%s.packaged' % pkg | 1222 | packagedfile = pkgdatadir + '/runtime/%s.packaged' % pkg |
1199 | file(packagedfile, 'w').close() | 1223 | file(packagedfile, 'w').close() |
1200 | 1224 | ||
1225 | if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d): | ||
1226 | write_extra_runtime_pkgs(variants, packages, pkgdatadir) | ||
1227 | |||
1228 | if bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d): | ||
1229 | write_extra_runtime_pkgs(global_variants, packages, pkgdatadir) | ||
1230 | |||
1201 | bb.utils.unlockfile(lf) | 1231 | bb.utils.unlockfile(lf) |
1202 | } | 1232 | } |
1203 | emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse" | 1233 | emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse" |