diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-01 15:18:15 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-11 22:15:59 +0100 |
commit | 911146122c03738c3ad7862c4c9a097d3a9cd24e (patch) | |
tree | 65839df41e59c7bdc60f7411e0fab57fff6b6508 /meta/classes | |
parent | 8329bfd1566b1fc584a904f5429dec445f7ebc9c (diff) | |
download | poky-911146122c03738c3ad7862c4c9a097d3a9cd24e.tar.gz |
staging: Fix a logic error which caused dependency removal
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.
(From OE-Core rev: 1634fe5148b3501f2c1b75cf7fb704a2ef60424e)
(From OE-Core rev: 3969c068bc9557b405a5ad61c10c402ec93bd932)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a6631eed6fc70b305e769998d6f22f345e37decc)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/staging.bbclass | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index 286d7b7e9e..a90cf43c94 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass | |||
@@ -497,8 +497,8 @@ python extend_recipe_sysroot() { | |||
497 | for l in f: | 497 | for l in f: |
498 | l = l.strip() | 498 | l = l.strip() |
499 | if l not in installed: | 499 | if l not in installed: |
500 | l = depdir + "/" + l | 500 | fl = depdir + "/" + l |
501 | if not os.path.exists(l): | 501 | if not os.path.exists(fl): |
502 | # Was likely already uninstalled | 502 | # Was likely already uninstalled |
503 | continue | 503 | continue |
504 | potential.append(l) | 504 | potential.append(l) |
@@ -514,11 +514,12 @@ python extend_recipe_sysroot() { | |||
514 | if l in potential: | 514 | if l in potential: |
515 | potential.remove(l) | 515 | potential.remove(l) |
516 | for l in potential: | 516 | for l in potential: |
517 | fl = depdir + "/" + l | ||
517 | bb.note("Task %s no longer depends on %s, removing from sysroot" % (mytaskname, l)) | 518 | bb.note("Task %s no longer depends on %s, removing from sysroot" % (mytaskname, l)) |
518 | lnk = os.readlink(l) | 519 | lnk = os.readlink(fl) |
519 | sstate_clean_manifest(depdir + "/" + lnk, d, workdir) | 520 | sstate_clean_manifest(depdir + "/" + lnk, d, workdir) |
520 | os.unlink(l) | 521 | os.unlink(fl) |
521 | os.unlink(l + ".complete") | 522 | os.unlink(fl + ".complete") |
522 | 523 | ||
523 | for dep in configuredeps: | 524 | for dep in configuredeps: |
524 | c = setscenedeps[dep][0] | 525 | c = setscenedeps[dep][0] |