summaryrefslogtreecommitdiffstats
path: root/recipes-extended/xen/xen.inc
diff options
context:
space:
mode:
authorChristopher Larson <kergoth@gmail.com>2015-03-16 11:55:33 -0700
committerBruce Ashfield <bruce.ashfield@windriver.com>2015-03-17 09:42:00 -0400
commit8a0ecb59fa9e23f690a8aecea8e1812d79f752e7 (patch)
tree9e9a39223ad0a8e868757c8f930a88a2398263ac /recipes-extended/xen/xen.inc
parente1b0876fa9e70739844073af4d5a85de403c6e78 (diff)
downloadmeta-virtualization-8a0ecb59fa9e23f690a8aecea8e1812d79f752e7.tar.gz
xen: avoid parse time errors for non-xen-archs
XEN_TARGET_ARCH, when expanded, would emit a bb.error(). Referencing XEN_TARGET_ARCH in PACKAGECONFIG resulted in its expansion at the up front parse time, rather than at compile time, so non-xen-supported-archs like powerpc would see parse time errors, resulting in non-zero bitbake exit codes. Naturally this isn't ideal, so instead have the mapping function return 'INVALID' in the unsupported case, and in anonymous python, raise SkipPackage if the mapped architecture is invalid, so it's seen as unbuildable in that case. Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-extended/xen/xen.inc')
-rw-r--r--recipes-extended/xen/xen.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/recipes-extended/xen/xen.inc b/recipes-extended/xen/xen.inc
index 0e4136aa..432bf4d4 100644
--- a/recipes-extended/xen/xen.inc
+++ b/recipes-extended/xen/xen.inc
@@ -663,6 +663,11 @@ export STAGING_LIBDIR
663export XEN_TARGET_ARCH = "${@map_xen_arch(d.getVar('TARGET_ARCH', True), d)}" 663export XEN_TARGET_ARCH = "${@map_xen_arch(d.getVar('TARGET_ARCH', True), d)}"
664export XEN_COMPILE_ARCH = "${@map_xen_arch(d.getVar('BUILD_ARCH', True), d)}" 664export XEN_COMPILE_ARCH = "${@map_xen_arch(d.getVar('BUILD_ARCH', True), d)}"
665 665
666python () {
667 if d.getVar('XEN_TARGET_ARCH', True) == 'INVALID':
668 raise bb.parse.SkipPackage('Cannot map `%s` to a xen architecture' % d.getVar('TARGET_ARCH', True))
669}
670
666# hardcoded as Linux, as the only compatible hosts are Linux. 671# hardcoded as Linux, as the only compatible hosts are Linux.
667export XEN_OS = "Linux" 672export XEN_OS = "Linux"
668 673