From 842ad94cad240b7fead97bf3ac03fa70323d24e3 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 29 Jun 2018 16:33:26 +0000 Subject: staging/image: Fix multilib recipe sysroot issues Currently if you enable multilib, then build an image, the multilib recipe sysroot is build in the wrong WORKDIR. If you then clean and rebuild the image you see "file exists" errors. This patch ensures the real WORKDIR is used consistently and then cleans/rebuilds also work correctly. (From OE-Core rev: c013ae59a158378d06ecf8eb123df0a10bf986b4) (From OE-Core rev: 7631301b5fc27ab9dda00fcf3d4a0faf685c26dd) (From OE-Core rev: e167e99621009f92d677ff6dac303d09e42361b5) Signed-off-by: Richard Purdie --- meta/classes/staging.bbclass | 4 ++++ meta/classes/utils.bbclass | 2 ++ 2 files changed, 6 insertions(+) (limited to 'meta') diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index 3fcbc9f15d..f04c7b637d 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass @@ -471,6 +471,10 @@ python extend_recipe_sysroot() { os.symlink(c + "." + taskhash, depdir + "/" + c) manifest, d2 = oe.sstatesig.find_sstate_manifest(c, setscenedeps[dep][2], "populate_sysroot", d, multilibs) + if d2 is not d: + # If we don't do this, the recipe sysroot will be placed in the wrong WORKDIR for multilibs + # We need a consistent WORKDIR for the image + d2.setVar("WORKDIR", d.getVar("WORKDIR")) destsysroot = d2.getVar("RECIPE_SYSROOT") native = False diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass index 4f016e3d00..3f4f51b56b 100644 --- a/meta/classes/utils.bbclass +++ b/meta/classes/utils.bbclass @@ -338,6 +338,8 @@ def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' variants = d.getVar("MULTILIB_VARIANTS") or "" for item in variants.split(): localdata = get_multilib_datastore(item, d) + # We need WORKDIR to be consistent with the original datastore + localdata.setVar("WORKDIR", d.getVar("WORKDIR")) value = localdata.getVar(var) or "" if value != "": if need_split: -- cgit v1.2.3-54-g00ecf