diff options
-rw-r--r-- | meta/classes/staging.bbclass | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index 5dab42745f..5b04f88b2d 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass | |||
@@ -277,11 +277,13 @@ python extend_recipe_sysroot() { | |||
277 | 277 | ||
278 | start = None | 278 | start = None |
279 | configuredeps = [] | 279 | configuredeps = [] |
280 | owntaskdeps = [] | ||
280 | for dep in taskdepdata: | 281 | for dep in taskdepdata: |
281 | data = taskdepdata[dep] | 282 | data = taskdepdata[dep] |
282 | if data[1] == mytaskname and data[0] == pn: | 283 | if data[1] == mytaskname and data[0] == pn: |
283 | start = dep | 284 | start = dep |
284 | break | 285 | elif data[0] == pn: |
286 | owntaskdeps.append(data[1]) | ||
285 | if start is None: | 287 | if start is None: |
286 | bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?") | 288 | bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?") |
287 | 289 | ||
@@ -427,7 +429,7 @@ python extend_recipe_sysroot() { | |||
427 | # Was likely already uninstalled | 429 | # Was likely already uninstalled |
428 | continue | 430 | continue |
429 | potential.append(l) | 431 | potential.append(l) |
430 | # We need to ensure not other task needs this dependency. We hold the sysroot | 432 | # We need to ensure no other task needs this dependency. We hold the sysroot |
431 | # lock so we ca search the indexes to check | 433 | # lock so we ca search the indexes to check |
432 | if potential: | 434 | if potential: |
433 | for i in glob.glob(depdir + "/index.*"): | 435 | for i in glob.glob(depdir + "/index.*"): |
@@ -435,6 +437,11 @@ python extend_recipe_sysroot() { | |||
435 | continue | 437 | continue |
436 | with open(i, "r") as f: | 438 | with open(i, "r") as f: |
437 | for l in f: | 439 | for l in f: |
440 | if l.startswith("TaskDeps:"): | ||
441 | prevtasks = l.split()[1:] | ||
442 | if mytaskname in prevtasks: | ||
443 | # We're a dependency of this task so we can clear items out the sysroot | ||
444 | break | ||
438 | l = l.strip() | 445 | l = l.strip() |
439 | if l in potential: | 446 | if l in potential: |
440 | potential.remove(l) | 447 | potential.remove(l) |
@@ -588,6 +595,7 @@ python extend_recipe_sysroot() { | |||
588 | os.symlink(manifests[dep], depdir + "/" + c + ".complete") | 595 | os.symlink(manifests[dep], depdir + "/" + c + ".complete") |
589 | 596 | ||
590 | with open(taskindex, "w") as f: | 597 | with open(taskindex, "w") as f: |
598 | f.write("TaskDeps: " + " ".join(owntaskdeps) + "\n") | ||
591 | for l in sorted(installed): | 599 | for l in sorted(installed): |
592 | f.write(l + "\n") | 600 | f.write(l + "\n") |
593 | 601 | ||