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-02 00:52:10 +0100 |
commit | a6631eed6fc70b305e769998d6f22f345e37decc (patch) | |
tree | 72b7e2b439bb95eadd28e0747c019dd30e7a2a73 | |
parent | 627d9a71dfedd30da2beb5e967f38b2f908f98d5 (diff) | |
download | poky-a6631eed6fc70b305e769998d6f22f345e37decc.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)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 eb06f398ac..a774088393 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass | |||
@@ -416,8 +416,8 @@ python extend_recipe_sysroot() { | |||
416 | for l in f: | 416 | for l in f: |
417 | l = l.strip() | 417 | l = l.strip() |
418 | if l not in installed: | 418 | if l not in installed: |
419 | l = depdir + "/" + l | 419 | fl = depdir + "/" + l |
420 | if not os.path.exists(l): | 420 | if not os.path.exists(fl): |
421 | # Was likely already uninstalled | 421 | # Was likely already uninstalled |
422 | continue | 422 | continue |
423 | potential.append(l) | 423 | potential.append(l) |
@@ -433,11 +433,12 @@ python extend_recipe_sysroot() { | |||
433 | if l in potential: | 433 | if l in potential: |
434 | potential.remove(l) | 434 | potential.remove(l) |
435 | for l in potential: | 435 | for l in potential: |
436 | fl = depdir + "/" + l | ||
436 | bb.note("Task %s no longer depends on %s, removing from sysroot" % (mytaskname, l)) | 437 | bb.note("Task %s no longer depends on %s, removing from sysroot" % (mytaskname, l)) |
437 | lnk = os.readlink(l) | 438 | lnk = os.readlink(fl) |
438 | sstate_clean_manifest(depdir + "/" + lnk, d, workdir) | 439 | sstate_clean_manifest(depdir + "/" + lnk, d, workdir) |
439 | os.unlink(l) | 440 | os.unlink(fl) |
440 | os.unlink(l + ".complete") | 441 | os.unlink(fl + ".complete") |
441 | 442 | ||
442 | for dep in configuredeps: | 443 | for dep in configuredeps: |
443 | c = setscenedeps[dep][0] | 444 | c = setscenedeps[dep][0] |