summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-02-17 17:09:33 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-21 23:37:26 +0000
commit424269caeadd21b01a860d032ca81167c7ce7239 (patch)
tree62b67232f8b358fddac8617ded45df7aa61442a2 /bitbake
parent09a62d96c76333f8abda1d28156378e42630fd9a (diff)
downloadpoky-424269caeadd21b01a860d032ca81167c7ce7239.tar.gz
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>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cooker.py24
-rw-r--r--bitbake/lib/bb/cookerdata.py4
-rwxr-xr-xbitbake/lib/bb/main.py2
-rw-r--r--bitbake/lib/bb/runqueue.py12
-rw-r--r--bitbake/lib/bb/taskdata.py10
5 files changed, 26 insertions, 26 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 2ed984d769..0133a3278f 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -199,7 +199,7 @@ class BBCooker:
199 199
200 self.inotify_modified_files = [] 200 self.inotify_modified_files = []
201 201
202 def _process_inotify_updates(server, cooker, abort): 202 def _process_inotify_updates(server, cooker, halt):
203 cooker.process_inotify_updates() 203 cooker.process_inotify_updates()
204 return 1.0 204 return 1.0
205 205
@@ -505,7 +505,7 @@ class BBCooker:
505 logger.debug("Base environment change, triggering reparse") 505 logger.debug("Base environment change, triggering reparse")
506 self.reset() 506 self.reset()
507 507
508 def runCommands(self, server, data, abort): 508 def runCommands(self, server, data, halt):
509 """ 509 """
510 Run any queued asynchronous command 510 Run any queued asynchronous command
511 This is done by the idle handler so it runs in true context rather than 511 This is done by the idle handler so it runs in true context rather than
@@ -578,7 +578,7 @@ class BBCooker:
578 if pkgs_to_build[0] in set(ignore.split()): 578 if pkgs_to_build[0] in set(ignore.split()):
579 bb.fatal("%s is in ASSUME_PROVIDED" % pkgs_to_build[0]) 579 bb.fatal("%s is in ASSUME_PROVIDED" % pkgs_to_build[0])
580 580
581 taskdata, runlist = self.buildTaskData(pkgs_to_build, None, self.configuration.abort, allowincomplete=True) 581 taskdata, runlist = self.buildTaskData(pkgs_to_build, None, self.configuration.halt, allowincomplete=True)
582 582
583 mc = runlist[0][0] 583 mc = runlist[0][0]
584 fn = runlist[0][3] 584 fn = runlist[0][3]
@@ -616,7 +616,7 @@ class BBCooker:
616 self.disableDataTracking() 616 self.disableDataTracking()
617 self.reset() 617 self.reset()
618 618
619 def buildTaskData(self, pkgs_to_build, task, abort, allowincomplete=False): 619 def buildTaskData(self, pkgs_to_build, task, halt, allowincomplete=False):
620 """ 620 """
621 Prepare a runqueue and taskdata object for iteration over pkgs_to_build 621 Prepare a runqueue and taskdata object for iteration over pkgs_to_build
622 """ 622 """
@@ -663,7 +663,7 @@ class BBCooker:
663 localdata = {} 663 localdata = {}
664 664
665 for mc in self.multiconfigs: 665 for mc in self.multiconfigs:
666 taskdata[mc] = bb.taskdata.TaskData(abort, skiplist=self.skiplist, allowincomplete=allowincomplete) 666 taskdata[mc] = bb.taskdata.TaskData(halt, skiplist=self.skiplist, allowincomplete=allowincomplete)
667 localdata[mc] = data.createCopy(self.databuilder.mcdata[mc]) 667 localdata[mc] = data.createCopy(self.databuilder.mcdata[mc])
668 bb.data.expandKeys(localdata[mc]) 668 bb.data.expandKeys(localdata[mc])
669 669
@@ -737,7 +737,7 @@ class BBCooker:
737 Prepare a runqueue and taskdata object for iteration over pkgs_to_build 737 Prepare a runqueue and taskdata object for iteration over pkgs_to_build
738 """ 738 """
739 739
740 # We set abort to False here to prevent unbuildable targets raising 740 # We set halt to False here to prevent unbuildable targets raising
741 # an exception when we're just generating data 741 # an exception when we're just generating data
742 taskdata, runlist = self.buildTaskData(pkgs_to_build, task, False, allowincomplete=True) 742 taskdata, runlist = self.buildTaskData(pkgs_to_build, task, False, allowincomplete=True)
743 743
@@ -1425,7 +1425,7 @@ class BBCooker:
1425 1425
1426 # Setup taskdata structure 1426 # Setup taskdata structure
1427 taskdata = {} 1427 taskdata = {}
1428 taskdata[mc] = bb.taskdata.TaskData(self.configuration.abort) 1428 taskdata[mc] = bb.taskdata.TaskData(self.configuration.halt)
1429 taskdata[mc].add_provider(self.databuilder.mcdata[mc], self.recipecaches[mc], item) 1429 taskdata[mc].add_provider(self.databuilder.mcdata[mc], self.recipecaches[mc], item)
1430 1430
1431 if quietlog: 1431 if quietlog:
@@ -1441,11 +1441,11 @@ class BBCooker:
1441 1441
1442 rq = bb.runqueue.RunQueue(self, self.data, self.recipecaches, taskdata, runlist) 1442 rq = bb.runqueue.RunQueue(self, self.data, self.recipecaches, taskdata, runlist)
1443 1443
1444 def buildFileIdle(server, rq, abort): 1444 def buildFileIdle(server, rq, halt):
1445 1445
1446 msg = None 1446 msg = None
1447 interrupted = 0 1447 interrupted = 0
1448 if abort or self.state == state.forceshutdown: 1448 if halt or self.state == state.forceshutdown:
1449 rq.finish_runqueue(True) 1449 rq.finish_runqueue(True)
1450 msg = "Forced shutdown" 1450 msg = "Forced shutdown"
1451 interrupted = 2 1451 interrupted = 2
@@ -1487,10 +1487,10 @@ class BBCooker:
1487 Attempt to build the targets specified 1487 Attempt to build the targets specified
1488 """ 1488 """
1489 1489
1490 def buildTargetsIdle(server, rq, abort): 1490 def buildTargetsIdle(server, rq, halt):
1491 msg = None 1491 msg = None
1492 interrupted = 0 1492 interrupted = 0
1493 if abort or self.state == state.forceshutdown: 1493 if halt or self.state == state.forceshutdown:
1494 rq.finish_runqueue(True) 1494 rq.finish_runqueue(True)
1495 msg = "Forced shutdown" 1495 msg = "Forced shutdown"
1496 interrupted = 2 1496 interrupted = 2
@@ -1533,7 +1533,7 @@ class BBCooker:
1533 1533
1534 bb.event.fire(bb.event.BuildInit(packages), self.data) 1534 bb.event.fire(bb.event.BuildInit(packages), self.data)
1535 1535
1536 taskdata, runlist = self.buildTaskData(targets, task, self.configuration.abort) 1536 taskdata, runlist = self.buildTaskData(targets, task, self.configuration.halt)
1537 1537
1538 buildname = self.data.getVar("BUILDNAME", False) 1538 buildname = self.data.getVar("BUILDNAME", False)
1539 1539
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index ddf05b92ab..fe5696c704 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -57,7 +57,7 @@ class ConfigParameters(object):
57 57
58 def updateToServer(self, server, environment): 58 def updateToServer(self, server, environment):
59 options = {} 59 options = {}
60 for o in ["abort", "force", "invalidate_stamp", 60 for o in ["halt", "force", "invalidate_stamp",
61 "dry_run", "dump_signatures", 61 "dry_run", "dump_signatures",
62 "extra_assume_provided", "profile", 62 "extra_assume_provided", "profile",
63 "prefile", "postfile", "server_timeout", 63 "prefile", "postfile", "server_timeout",
@@ -124,7 +124,7 @@ class CookerConfiguration(object):
124 self.prefile = [] 124 self.prefile = []
125 self.postfile = [] 125 self.postfile = []
126 self.cmd = None 126 self.cmd = None
127 self.abort = True 127 self.halt = True
128 self.force = False 128 self.force = False
129 self.profile = False 129 self.profile = False
130 self.nosetscene = False 130 self.nosetscene = False
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py
index 639fc1885d..93eda3632e 100755
--- a/bitbake/lib/bb/main.py
+++ b/bitbake/lib/bb/main.py
@@ -127,7 +127,7 @@ def create_bitbake_parser():
127 help="Execute tasks from a specific .bb recipe directly. WARNING: Does " 127 help="Execute tasks from a specific .bb recipe directly. WARNING: Does "
128 "not handle any dependencies from other recipes.") 128 "not handle any dependencies from other recipes.")
129 129
130 parser.add_option("-k", "--continue", action="store_false", dest="abort", default=True, 130 parser.add_option("-k", "--continue", action="store_false", dest="halt", default=True,
131 help="Continue as much as possible after an error. While the target that " 131 help="Continue as much as possible after an error. While the target that "
132 "failed and anything depending on it cannot be built, as much as " 132 "failed and anything depending on it cannot be built, as much as "
133 "possible will be built before stopping.") 133 "possible will be built before stopping.")
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index aedf935476..a7a84630d7 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -485,7 +485,7 @@ class RunQueueData:
485 msgs.append(" Task %s (dependent Tasks %s)\n" % (dep, self.runq_depends_names(self.runtaskentries[dep].depends))) 485 msgs.append(" Task %s (dependent Tasks %s)\n" % (dep, self.runq_depends_names(self.runtaskentries[dep].depends)))
486 msgs.append("\n") 486 msgs.append("\n")
487 if len(valid_chains) > 10: 487 if len(valid_chains) > 10:
488 msgs.append("Aborted dependency loops search after 10 matches.\n") 488 msgs.append("Halted dependency loops search after 10 matches.\n")
489 raise TooManyLoops 489 raise TooManyLoops
490 continue 490 continue
491 scan = False 491 scan = False
@@ -989,7 +989,7 @@ class RunQueueData:
989 989
990 # Check to make sure we still have tasks to run 990 # Check to make sure we still have tasks to run
991 if not self.runtaskentries: 991 if not self.runtaskentries:
992 if not taskData[''].abort: 992 if not taskData[''].halt:
993 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.") 993 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.")
994 else: 994 else:
995 bb.msg.fatal("RunQueue", "No active tasks and not in --continue mode?! Please report this bug.") 995 bb.msg.fatal("RunQueue", "No active tasks and not in --continue mode?! Please report this bug.")
@@ -1424,7 +1424,7 @@ class RunQueue:
1424 """ 1424 """
1425 Run the tasks in a queue prepared by rqdata.prepare() 1425 Run the tasks in a queue prepared by rqdata.prepare()
1426 Upon failure, optionally try to recover the build using any alternate providers 1426 Upon failure, optionally try to recover the build using any alternate providers
1427 (if the abort on failure configuration option isn't set) 1427 (if the halt on failure configuration option isn't set)
1428 """ 1428 """
1429 1429
1430 retval = True 1430 retval = True
@@ -1929,7 +1929,7 @@ class RunQueueExecute:
1929 1929
1930 bb.event.fire(runQueueTaskFailed(task, self.stats, exitcode, self.rq, fakeroot_log=("".join(fakeroot_log) or None)), self.cfgData) 1930 bb.event.fire(runQueueTaskFailed(task, self.stats, exitcode, self.rq, fakeroot_log=("".join(fakeroot_log) or None)), self.cfgData)
1931 1931
1932 if self.rqdata.taskData[''].abort: 1932 if self.rqdata.taskData[''].halt:
1933 self.rq.state = runQueueCleanUp 1933 self.rq.state = runQueueCleanUp
1934 1934
1935 def task_skip(self, task, reason): 1935 def task_skip(self, task, reason):
@@ -2392,7 +2392,7 @@ class RunQueueExecute:
2392 self.tasks_scenequeue_done.remove(tid) 2392 self.tasks_scenequeue_done.remove(tid)
2393 for dep in self.sqdata.sq_covered_tasks[tid]: 2393 for dep in self.sqdata.sq_covered_tasks[tid]:
2394 if dep in self.runq_complete and dep not in self.runq_tasksrun: 2394 if dep in self.runq_complete and dep not in self.runq_tasksrun:
2395 bb.error("Task %s marked as completed but now needing to rerun? Aborting build." % dep) 2395 bb.error("Task %s marked as completed but now needing to rerun? Halting build." % dep)
2396 self.failed_tids.append(tid) 2396 self.failed_tids.append(tid)
2397 self.rq.state = runQueueCleanUp 2397 self.rq.state = runQueueCleanUp
2398 return 2398 return
@@ -2710,7 +2710,7 @@ def build_scenequeue_data(sqdata, rqdata, rq, cooker, stampcache, sqrq):
2710 if tid in rqdata.runq_setscene_tids: 2710 if tid in rqdata.runq_setscene_tids:
2711 pass 2711 pass
2712 elif sq_revdeps_squash[tid]: 2712 elif sq_revdeps_squash[tid]:
2713 bb.msg.fatal("RunQueue", "Something went badly wrong during scenequeue generation, aborting. Please report this problem.") 2713 bb.msg.fatal("RunQueue", "Something went badly wrong during scenequeue generation, halting. Please report this problem.")
2714 else: 2714 else:
2715 del sq_revdeps_squash[tid] 2715 del sq_revdeps_squash[tid]
2716 rqdata.init_progress_reporter.update(taskcounter) 2716 rqdata.init_progress_reporter.update(taskcounter)
diff --git a/bitbake/lib/bb/taskdata.py b/bitbake/lib/bb/taskdata.py
index 7bfcdb8414..66545a65af 100644
--- a/bitbake/lib/bb/taskdata.py
+++ b/bitbake/lib/bb/taskdata.py
@@ -39,7 +39,7 @@ class TaskData:
39 """ 39 """
40 BitBake Task Data implementation 40 BitBake Task Data implementation
41 """ 41 """
42 def __init__(self, abort = True, skiplist = None, allowincomplete = False): 42 def __init__(self, halt = True, skiplist = None, allowincomplete = False):
43 self.build_targets = {} 43 self.build_targets = {}
44 self.run_targets = {} 44 self.run_targets = {}
45 45
@@ -57,7 +57,7 @@ class TaskData:
57 self.failed_rdeps = [] 57 self.failed_rdeps = []
58 self.failed_fns = [] 58 self.failed_fns = []
59 59
60 self.abort = abort 60 self.halt = halt
61 self.allowincomplete = allowincomplete 61 self.allowincomplete = allowincomplete
62 62
63 self.skiplist = skiplist 63 self.skiplist = skiplist
@@ -328,7 +328,7 @@ class TaskData:
328 try: 328 try:
329 self.add_provider_internal(cfgData, dataCache, item) 329 self.add_provider_internal(cfgData, dataCache, item)
330 except bb.providers.NoProvider: 330 except bb.providers.NoProvider:
331 if self.abort: 331 if self.halt:
332 raise 332 raise
333 self.remove_buildtarget(item) 333 self.remove_buildtarget(item)
334 334
@@ -479,7 +479,7 @@ class TaskData:
479 fn = tid.rsplit(":",1)[0] 479 fn = tid.rsplit(":",1)[0]
480 self.fail_fn(fn, missing_list) 480 self.fail_fn(fn, missing_list)
481 481
482 if self.abort and target in self.external_targets: 482 if self.halt and target in self.external_targets:
483 logger.error("Required build target '%s' has no buildable providers.\nMissing or unbuildable dependency chain was: %s", target, missing_list) 483 logger.error("Required build target '%s' has no buildable providers.\nMissing or unbuildable dependency chain was: %s", target, missing_list)
484 raise bb.providers.NoProvider(target) 484 raise bb.providers.NoProvider(target)
485 485
@@ -516,7 +516,7 @@ class TaskData:
516 self.add_provider_internal(cfgData, dataCache, target) 516 self.add_provider_internal(cfgData, dataCache, target)
517 added = added + 1 517 added = added + 1
518 except bb.providers.NoProvider: 518 except bb.providers.NoProvider:
519 if self.abort and target in self.external_targets and not self.allowincomplete: 519 if self.halt and target in self.external_targets and not self.allowincomplete:
520 raise 520 raise
521 if not self.allowincomplete: 521 if not self.allowincomplete:
522 self.remove_buildtarget(target) 522 self.remove_buildtarget(target)