diff options
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 4f69578e46..addb2bb82f 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -849,6 +849,20 @@ class RunQueueData: | |||
849 | for depend in depends: | 849 | for depend in depends: |
850 | mark_active(depend, depth+1) | 850 | mark_active(depend, depth+1) |
851 | 851 | ||
852 | def invalidate_task(tid, error_nostamp): | ||
853 | (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) | ||
854 | taskdep = self.dataCaches[mc].task_deps[taskfn] | ||
855 | if fn + ":" + taskname not in taskData[mc].taskentries: | ||
856 | logger.warning("Task %s does not exist, invalidating this task will have no effect" % taskname) | ||
857 | if 'nostamp' in taskdep and taskname in taskdep['nostamp']: | ||
858 | if error_nostamp: | ||
859 | bb.fatal("Task %s is marked nostamp, cannot invalidate this task" % taskname) | ||
860 | else: | ||
861 | bb.debug(1, "Task %s is marked nostamp, cannot invalidate this task" % taskname) | ||
862 | else: | ||
863 | logger.verbose("Invalidate task %s, %s", taskname, fn) | ||
864 | bb.parse.siggen.invalidate_task(taskname, self.dataCaches[mc], taskfn) | ||
865 | |||
852 | self.target_tids = [] | 866 | self.target_tids = [] |
853 | for (mc, target, task, fn) in self.targets: | 867 | for (mc, target, task, fn) in self.targets: |
854 | 868 | ||
@@ -917,6 +931,8 @@ class RunQueueData: | |||
917 | 931 | ||
918 | for tid in list(runall_tids): | 932 | for tid in list(runall_tids): |
919 | mark_active(tid,1) | 933 | mark_active(tid,1) |
934 | if self.cooker.configuration.force: | ||
935 | invalidate_task(tid, False) | ||
920 | 936 | ||
921 | for tid in list(self.runtaskentries.keys()): | 937 | for tid in list(self.runtaskentries.keys()): |
922 | if tid not in runq_build: | 938 | if tid not in runq_build: |
@@ -938,6 +954,8 @@ class RunQueueData: | |||
938 | 954 | ||
939 | for tid in list(runonly_tids): | 955 | for tid in list(runonly_tids): |
940 | mark_active(tid,1) | 956 | mark_active(tid,1) |
957 | if self.cooker.configuration.force: | ||
958 | invalidate_task(tid, False) | ||
941 | 959 | ||
942 | for tid in list(self.runtaskentries.keys()): | 960 | for tid in list(self.runtaskentries.keys()): |
943 | if tid not in runq_build: | 961 | if tid not in runq_build: |
@@ -1114,20 +1132,6 @@ class RunQueueData: | |||
1114 | continue | 1132 | continue |
1115 | self.runq_setscene_tids.append(tid) | 1133 | self.runq_setscene_tids.append(tid) |
1116 | 1134 | ||
1117 | def invalidate_task(tid, error_nostamp): | ||
1118 | (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) | ||
1119 | taskdep = self.dataCaches[mc].task_deps[taskfn] | ||
1120 | if fn + ":" + taskname not in taskData[mc].taskentries: | ||
1121 | logger.warning("Task %s does not exist, invalidating this task will have no effect" % taskname) | ||
1122 | if 'nostamp' in taskdep and taskname in taskdep['nostamp']: | ||
1123 | if error_nostamp: | ||
1124 | bb.fatal("Task %s is marked nostamp, cannot invalidate this task" % taskname) | ||
1125 | else: | ||
1126 | bb.debug(1, "Task %s is marked nostamp, cannot invalidate this task" % taskname) | ||
1127 | else: | ||
1128 | logger.verbose("Invalidate task %s, %s", taskname, fn) | ||
1129 | bb.parse.siggen.invalidate_task(taskname, self.dataCaches[mc], taskfn) | ||
1130 | |||
1131 | self.init_progress_reporter.next_stage() | 1135 | self.init_progress_reporter.next_stage() |
1132 | 1136 | ||
1133 | # Invalidate task if force mode active | 1137 | # Invalidate task if force mode active |