]> code.ossystems Code Review - openembedded-core.git/commitdiff
staging/image: Fix multilib recipe sysroot issues
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 29 Jun 2018 16:33:26 +0000 (16:33 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 2 Jul 2018 16:13:19 +0000 (17:13 +0100)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/staging.bbclass
meta/classes/utils.bbclass

index 3fcbc9f15d32d4ac3512bc356c609335aaf11ce1..f04c7b637d9d4e0628c541398c431c41b476e3fe 100644 (file)
@@ -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
index 4f016e3d002e1e9933e4d0efeea68ca4c7292e52..3f4f51b56becf63c948b88b745844657d9341544 100644 (file)
@@ -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: