From 671cd320573cc2ba85d5dee67e471a5780e83681 Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Mon, 16 Oct 2017 11:15:29 +0800 Subject: staging.bbclass: fix for multilib Fixed: MACHINE = "qemux86-64" MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "x86" $ bitbake -cpopulate_sdk_ext [snip] Exception: subprocess.CalledProcessError: Command 'sed -e [snip]' [snip] Subprocess output: [snip] sed: can't read /path/to/work/qemux86_64-wrs-linux/wrlinux-image-glibc-small/1.0-r1/recipe-sysroot/usr/lib/perl/5.24.1/ExtUtils/Liblist/Kid.pm: No such file or directory [snip] It was failed because "/usr/lib" is in qemux86_64-wrsmllib32-linux/, not in qemux86_64-wrs-linux. The code has considered mutitlib, but seems not completed, the multilib "variant" was not in fixme, so it wasn't handled correctly, this patch fixes the problem. Signed-off-by: Robert Yang --- meta/classes/staging.bbclass | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index 1b9e84d97e..412e269bd2 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass @@ -480,6 +480,13 @@ python extend_recipe_sysroot() { multilibs[variant] = get_multilib_datastore(variant, d) d2 = multilibs[variant] destsysroot = d2.getVar("RECIPE_SYSROOT") + if variant not in fixme: + fixme[variant] = [] + # Clear variant when variant == current_variant since we + # don't need handle it as multilib in this case, just handle + # it as normal is OK. + else: + variant = '' native = False if c.endswith("-native"): @@ -508,6 +515,9 @@ python extend_recipe_sysroot() { if native: fm = fixme['native'] targetdir = recipesysrootnative + elif variant: + fm = fixme[variant] + targetdir = destsysroot else: fm = fixme[''] targetdir = destsysroot -- cgit 1.2.3-korg