]> code.ossystems Code Review - openembedded-core.git/commitdiff
staging: Fix a logic error which caused dependency removal
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Sep 2017 14:18:15 +0000 (15:18 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Sep 2017 22:58:49 +0000 (23:58 +0100)
There was a logic error in the dependency cleanup code which meant
it would remove dependencies which other tasks still depended upon.
Fix the path names so the comparisions work as intended.

This fixes dependencies accidentally disappearing from sysroots
under certain reconfiguration situations.

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

index eb06f398acceee218eef5bd7d952a5a411135d1c..a7740883932de351b14f64798c3d7fe10fe1de20 100644 (file)
@@ -416,8 +416,8 @@ python extend_recipe_sysroot() {
             for l in f:
                 l = l.strip()
                 if l not in installed:
-                    l = depdir + "/" + l
-                    if not os.path.exists(l):
+                    fl = depdir + "/" + l
+                    if not os.path.exists(fl):
                         # Was likely already uninstalled
                         continue
                     potential.append(l)
@@ -433,11 +433,12 @@ python extend_recipe_sysroot() {
                         if l in potential:
                             potential.remove(l)
         for l in potential:
+            fl = depdir + "/" + l
             bb.note("Task %s no longer depends on %s, removing from sysroot" % (mytaskname, l))
-            lnk = os.readlink(l)
+            lnk = os.readlink(fl)
             sstate_clean_manifest(depdir + "/" + lnk, d, workdir)
-            os.unlink(l)
-            os.unlink(l + ".complete")
+            os.unlink(fl)
+            os.unlink(fl + ".complete")
 
     for dep in configuredeps:
         c = setscenedeps[dep][0]