diff options
-rw-r--r-- | meta/classes/staging.bbclass | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index 9fc8f4f283..8372a4574a 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass | |||
@@ -404,7 +404,9 @@ python extend_recipe_sysroot() { | |||
404 | # All files that we're going to be installing, to find conflicts. | 404 | # All files that we're going to be installing, to find conflicts. |
405 | fileset = {} | 405 | fileset = {} |
406 | 406 | ||
407 | invalidate_tasks = set() | ||
407 | for f in os.listdir(depdir): | 408 | for f in os.listdir(depdir): |
409 | removed = [] | ||
408 | if not f.endswith(".complete"): | 410 | if not f.endswith(".complete"): |
409 | continue | 411 | continue |
410 | f = depdir + "/" + f | 412 | f = depdir + "/" + f |
@@ -414,6 +416,28 @@ python extend_recipe_sysroot() { | |||
414 | sstate_clean_manifest(depdir + "/" + lnk, d, canrace=True, prefix=workdir) | 416 | sstate_clean_manifest(depdir + "/" + lnk, d, canrace=True, prefix=workdir) |
415 | os.unlink(f) | 417 | os.unlink(f) |
416 | os.unlink(f.replace(".complete", "")) | 418 | os.unlink(f.replace(".complete", "")) |
419 | removed.append(os.path.basename(f.replace(".complete", ""))) | ||
420 | |||
421 | # If we've removed files from the sysroot above, the task that installed them may still | ||
422 | # have a stamp file present for the task. This is probably invalid right now but may become | ||
423 | # valid again if the user were to change configuration back for example. Since we've removed | ||
424 | # the files a task might need, remove the stamp file too to force it to rerun. | ||
425 | # YOCTO #14790 | ||
426 | if removed: | ||
427 | for i in glob.glob(depdir + "/index.*"): | ||
428 | if i.endswith("." + mytaskname): | ||
429 | continue | ||
430 | with open(i, "r") as f: | ||
431 | for l in f: | ||
432 | if l.startswith("TaskDeps:"): | ||
433 | continue | ||
434 | l = l.strip() | ||
435 | if l in removed: | ||
436 | invalidate_tasks.add(i.rsplit(".", 1)[1]) | ||
437 | break | ||
438 | for t in invalidate_tasks: | ||
439 | bb.note("Invalidating stamps for task %s" % t) | ||
440 | bb.build.clean_stamp(t, d) | ||
417 | 441 | ||
418 | installed = [] | 442 | installed = [] |
419 | for dep in configuredeps: | 443 | for dep in configuredeps: |