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-01 23:58:49 +0100 |
commit | 1634fe5148b3501f2c1b75cf7fb704a2ef60424e (patch) | |
tree | df71bfd8073d82e53c2b9ea52eb457f356121361 /meta/classes | |
parent | 7f2f9b3ff011b340b5d23bb7c47b12c357dc9f02 (diff) | |
download | openembedded-core-1634fe5148b3501f2c1b75cf7fb704a2ef60424e.tar.gz openembedded-core-1634fe5148b3501f2c1b75cf7fb704a2ef60424e.tar.bz2 openembedded-core-1634fe5148b3501f2c1b75cf7fb704a2ef60424e.zip |
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.
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 eb06f398ac..a774088393 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass @@ -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] |