]> code.ossystems Code Review - openembedded-core.git/commitdiff
staging: Fix sysroot problem with populate_sysroot dependencies on do_fetch
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 10 Apr 2017 18:59:33 +0000 (19:59 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 10 Apr 2017 19:10:14 +0000 (20:10 +0100)
Dependencies on svn:// urls were failing as the cleandirs on do_fetch was destroying
any sysroot setup by the extend_recipe_sysroot function.

Add code so that if the task do_fetch, we move the cleandirs to the extend_recipe_sysroot
task else we'd wipe out the sysroot we just created.

This allows fetcher do_populate_sysroot dependencies to work correctly again.

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

index 27fcd1efa90eb1f0e0789d8162867a3ce2aa8ae2..c50abd05519921d51a8f97b6c86ddc0d669dea66 100644 (file)
@@ -647,6 +647,11 @@ python staging_taskhandler() {
         deps = d.getVarFlag(task, "depends")
         if deps and "populate_sysroot" in deps:
             d.appendVarFlag(task, "prefuncs", " extend_recipe_sysroot")
+        # If this is do_fetch, we need to move the cleandirs above to the extend_recipe_sysroot task
+        # else we'd wipe out the sysroot we just created.
+        if task == "do_fetch":
+            d.setVarFlag("extend_recipe_sysroot", "cleandirs", d.getVarFlag(task, "cleandirs"))
+            d.delVarFlag(task, "cleandirs")
 }
 staging_taskhandler[eventmask] = "bb.event.RecipeTaskPreProcess"
 addhandler staging_taskhandler