mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
bitbake: lib/bb: Replace "abort" usage in task handling
In line with the inclusive language migration defined at: https://wiki.yoctoproject.org/wiki/Inclusive_language replace the use of "abort" with "halt" in code related to handling task failure. (Bitbake rev: 831fb7f2329a3cd95b71e9c85d7d7f0d717f947f) Signed-off-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
09a62d96c7
commit
424269caea
|
@ -199,7 +199,7 @@ class BBCooker:
|
|||
|
||||
self.inotify_modified_files = []
|
||||
|
||||
def _process_inotify_updates(server, cooker, abort):
|
||||
def _process_inotify_updates(server, cooker, halt):
|
||||
cooker.process_inotify_updates()
|
||||
return 1.0
|
||||
|
||||
|
@ -505,7 +505,7 @@ class BBCooker:
|
|||
logger.debug("Base environment change, triggering reparse")
|
||||
self.reset()
|
||||
|
||||
def runCommands(self, server, data, abort):
|
||||
def runCommands(self, server, data, halt):
|
||||
"""
|
||||
Run any queued asynchronous command
|
||||
This is done by the idle handler so it runs in true context rather than
|
||||
|
@ -578,7 +578,7 @@ class BBCooker:
|
|||
if pkgs_to_build[0] in set(ignore.split()):
|
||||
bb.fatal("%s is in ASSUME_PROVIDED" % pkgs_to_build[0])
|
||||
|
||||
taskdata, runlist = self.buildTaskData(pkgs_to_build, None, self.configuration.abort, allowincomplete=True)
|
||||
taskdata, runlist = self.buildTaskData(pkgs_to_build, None, self.configuration.halt, allowincomplete=True)
|
||||
|
||||
mc = runlist[0][0]
|
||||
fn = runlist[0][3]
|
||||
|
@ -616,7 +616,7 @@ class BBCooker:
|
|||
self.disableDataTracking()
|
||||
self.reset()
|
||||
|
||||
def buildTaskData(self, pkgs_to_build, task, abort, allowincomplete=False):
|
||||
def buildTaskData(self, pkgs_to_build, task, halt, allowincomplete=False):
|
||||
"""
|
||||
Prepare a runqueue and taskdata object for iteration over pkgs_to_build
|
||||
"""
|
||||
|
@ -663,7 +663,7 @@ class BBCooker:
|
|||
localdata = {}
|
||||
|
||||
for mc in self.multiconfigs:
|
||||
taskdata[mc] = bb.taskdata.TaskData(abort, skiplist=self.skiplist, allowincomplete=allowincomplete)
|
||||
taskdata[mc] = bb.taskdata.TaskData(halt, skiplist=self.skiplist, allowincomplete=allowincomplete)
|
||||
localdata[mc] = data.createCopy(self.databuilder.mcdata[mc])
|
||||
bb.data.expandKeys(localdata[mc])
|
||||
|
||||
|
@ -737,7 +737,7 @@ class BBCooker:
|
|||
Prepare a runqueue and taskdata object for iteration over pkgs_to_build
|
||||
"""
|
||||
|
||||
# We set abort to False here to prevent unbuildable targets raising
|
||||
# We set halt to False here to prevent unbuildable targets raising
|
||||
# an exception when we're just generating data
|
||||
taskdata, runlist = self.buildTaskData(pkgs_to_build, task, False, allowincomplete=True)
|
||||
|
||||
|
@ -1425,7 +1425,7 @@ class BBCooker:
|
|||
|
||||
# Setup taskdata structure
|
||||
taskdata = {}
|
||||
taskdata[mc] = bb.taskdata.TaskData(self.configuration.abort)
|
||||
taskdata[mc] = bb.taskdata.TaskData(self.configuration.halt)
|
||||
taskdata[mc].add_provider(self.databuilder.mcdata[mc], self.recipecaches[mc], item)
|
||||
|
||||
if quietlog:
|
||||
|
@ -1441,11 +1441,11 @@ class BBCooker:
|
|||
|
||||
rq = bb.runqueue.RunQueue(self, self.data, self.recipecaches, taskdata, runlist)
|
||||
|
||||
def buildFileIdle(server, rq, abort):
|
||||
def buildFileIdle(server, rq, halt):
|
||||
|
||||
msg = None
|
||||
interrupted = 0
|
||||
if abort or self.state == state.forceshutdown:
|
||||
if halt or self.state == state.forceshutdown:
|
||||
rq.finish_runqueue(True)
|
||||
msg = "Forced shutdown"
|
||||
interrupted = 2
|
||||
|
@ -1487,10 +1487,10 @@ class BBCooker:
|
|||
Attempt to build the targets specified
|
||||
"""
|
||||
|
||||
def buildTargetsIdle(server, rq, abort):
|
||||
def buildTargetsIdle(server, rq, halt):
|
||||
msg = None
|
||||
interrupted = 0
|
||||
if abort or self.state == state.forceshutdown:
|
||||
if halt or self.state == state.forceshutdown:
|
||||
rq.finish_runqueue(True)
|
||||
msg = "Forced shutdown"
|
||||
interrupted = 2
|
||||
|
@ -1533,7 +1533,7 @@ class BBCooker:
|
|||
|
||||
bb.event.fire(bb.event.BuildInit(packages), self.data)
|
||||
|
||||
taskdata, runlist = self.buildTaskData(targets, task, self.configuration.abort)
|
||||
taskdata, runlist = self.buildTaskData(targets, task, self.configuration.halt)
|
||||
|
||||
buildname = self.data.getVar("BUILDNAME", False)
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ class ConfigParameters(object):
|
|||
|
||||
def updateToServer(self, server, environment):
|
||||
options = {}
|
||||
for o in ["abort", "force", "invalidate_stamp",
|
||||
for o in ["halt", "force", "invalidate_stamp",
|
||||
"dry_run", "dump_signatures",
|
||||
"extra_assume_provided", "profile",
|
||||
"prefile", "postfile", "server_timeout",
|
||||
|
@ -124,7 +124,7 @@ class CookerConfiguration(object):
|
|||
self.prefile = []
|
||||
self.postfile = []
|
||||
self.cmd = None
|
||||
self.abort = True
|
||||
self.halt = True
|
||||
self.force = False
|
||||
self.profile = False
|
||||
self.nosetscene = False
|
||||
|
|
|
@ -127,7 +127,7 @@ def create_bitbake_parser():
|
|||
help="Execute tasks from a specific .bb recipe directly. WARNING: Does "
|
||||
"not handle any dependencies from other recipes.")
|
||||
|
||||
parser.add_option("-k", "--continue", action="store_false", dest="abort", default=True,
|
||||
parser.add_option("-k", "--continue", action="store_false", dest="halt", default=True,
|
||||
help="Continue as much as possible after an error. While the target that "
|
||||
"failed and anything depending on it cannot be built, as much as "
|
||||
"possible will be built before stopping.")
|
||||
|
|
|
@ -485,7 +485,7 @@ class RunQueueData:
|
|||
msgs.append(" Task %s (dependent Tasks %s)\n" % (dep, self.runq_depends_names(self.runtaskentries[dep].depends)))
|
||||
msgs.append("\n")
|
||||
if len(valid_chains) > 10:
|
||||
msgs.append("Aborted dependency loops search after 10 matches.\n")
|
||||
msgs.append("Halted dependency loops search after 10 matches.\n")
|
||||
raise TooManyLoops
|
||||
continue
|
||||
scan = False
|
||||
|
@ -989,7 +989,7 @@ class RunQueueData:
|
|||
|
||||
# Check to make sure we still have tasks to run
|
||||
if not self.runtaskentries:
|
||||
if not taskData[''].abort:
|
||||
if not taskData[''].halt:
|
||||
bb.msg.fatal("RunQueue", "All buildable tasks have been run but the build is incomplete (--continue mode). Errors for the tasks that failed will have been printed above.")
|
||||
else:
|
||||
bb.msg.fatal("RunQueue", "No active tasks and not in --continue mode?! Please report this bug.")
|
||||
|
@ -1424,7 +1424,7 @@ class RunQueue:
|
|||
"""
|
||||
Run the tasks in a queue prepared by rqdata.prepare()
|
||||
Upon failure, optionally try to recover the build using any alternate providers
|
||||
(if the abort on failure configuration option isn't set)
|
||||
(if the halt on failure configuration option isn't set)
|
||||
"""
|
||||
|
||||
retval = True
|
||||
|
@ -1929,7 +1929,7 @@ class RunQueueExecute:
|
|||
|
||||
bb.event.fire(runQueueTaskFailed(task, self.stats, exitcode, self.rq, fakeroot_log=("".join(fakeroot_log) or None)), self.cfgData)
|
||||
|
||||
if self.rqdata.taskData[''].abort:
|
||||
if self.rqdata.taskData[''].halt:
|
||||
self.rq.state = runQueueCleanUp
|
||||
|
||||
def task_skip(self, task, reason):
|
||||
|
@ -2392,7 +2392,7 @@ class RunQueueExecute:
|
|||
self.tasks_scenequeue_done.remove(tid)
|
||||
for dep in self.sqdata.sq_covered_tasks[tid]:
|
||||
if dep in self.runq_complete and dep not in self.runq_tasksrun:
|
||||
bb.error("Task %s marked as completed but now needing to rerun? Aborting build." % dep)
|
||||
bb.error("Task %s marked as completed but now needing to rerun? Halting build." % dep)
|
||||
self.failed_tids.append(tid)
|
||||
self.rq.state = runQueueCleanUp
|
||||
return
|
||||
|
@ -2710,7 +2710,7 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq):
|
|||
if tid in rqdata.runq_setscene_tids:
|
||||
pass
|
||||
elif sq_revdeps_squash[tid]:
|
||||
bb.msg.fatal("RunQueue", "Something went badly wrong during scenequeue generation, aborting. Please report this problem.")
|
||||
bb.msg.fatal("RunQueue", "Something went badly wrong during scenequeue generation, halting. Please report this problem.")
|
||||
else:
|
||||
del sq_revdeps_squash[tid]
|
||||
rqdata.init_progress_reporter.update(taskcounter)
|
||||
|
|
|
@ -39,7 +39,7 @@ class TaskData:
|
|||
"""
|
||||
BitBake Task Data implementation
|
||||
"""
|
||||
def __init__(self, abort = True, skiplist = None, allowincomplete = False):
|
||||
def __init__(self, halt = True, skiplist = None, allowincomplete = False):
|
||||
self.build_targets = {}
|
||||
self.run_targets = {}
|
||||
|
||||
|
@ -57,7 +57,7 @@ class TaskData:
|
|||
self.failed_rdeps = []
|
||||
self.failed_fns = []
|
||||
|
||||
self.abort = abort
|
||||
self.halt = halt
|
||||
self.allowincomplete = allowincomplete
|
||||
|
||||
self.skiplist = skiplist
|
||||
|
@ -328,7 +328,7 @@ class TaskData:
|
|||
try:
|
||||
self.add_provider_internal(cfgData, dataCache, item)
|
||||
except bb.providers.NoProvider:
|
||||
if self.abort:
|
||||
if self.halt:
|
||||
raise
|
||||
self.remove_buildtarget(item)
|
||||
|
||||
|
@ -479,7 +479,7 @@ class TaskData:
|
|||
fn = tid.rsplit(":",1)[0]
|
||||
self.fail_fn(fn, missing_list)
|
||||
|
||||
if self.abort and target in self.external_targets:
|
||||
if self.halt and target in self.external_targets:
|
||||
logger.error("Required build target '%s' has no buildable providers.\nMissing or unbuildable dependency chain was: %s", target, missing_list)
|
||||
raise bb.providers.NoProvider(target)
|
||||
|
||||
|
@ -516,7 +516,7 @@ class TaskData:
|
|||
self.add_provider_internal(cfgData, dataCache, target)
|
||||
added = added + 1
|
||||
except bb.providers.NoProvider:
|
||||
if self.abort and target in self.external_targets and not self.allowincomplete:
|
||||
if self.halt and target in self.external_targets and not self.allowincomplete:
|
||||
raise
|
||||
if not self.allowincomplete:
|
||||
self.remove_buildtarget(target)
|
||||
|
|
Loading…
Reference in New Issue
Block a user