All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Further inclusive language fixes
@ 2022-02-17 22:09 Scott Murray
  2022-02-17 22:09 ` [PATCH 1/4] Replace remaining "blacklist"/"whitelist" usage Scott Murray
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Scott Murray @ 2022-02-17 22:09 UTC (permalink / raw)
  To: bitbake-devel

A set of patches to address the remaining blacklist/whitelist/abort
clean up tasks in BitBake on the list at:

https://wiki.yoctoproject.org/wiki/Inclusive_language

The BB_DISKMON_DIRS change is the most user visible, and I'll
be sending corresponding changes for oe-core and meta-poky to
quiet the new warning with respect to it that Richard requested.

Scott Murray (4):
  Replace remaining "blacklist"/"whitelist" usage
  Replace "abort" usage in task handling
  Replace "ABORT" action in BB_DISKMON_DIRS
  Replace remaining "abort" usage

 bin/toaster                                   |  4 ++--
 .../bitbake-user-manual-ref-variables.rst     | 12 +++++-----
 lib/bb/cooker.py                              | 24 +++++++++----------
 lib/bb/cookerdata.py                          |  4 ++--
 lib/bb/event.py                               |  2 +-
 lib/bb/fetch2/__init__.py                     |  2 +-
 lib/bb/main.py                                |  2 +-
 lib/bb/monitordisk.py                         | 17 ++++++++-----
 lib/bb/runqueue.py                            | 12 +++++-----
 lib/bb/siggen.py                              |  2 +-
 lib/bb/taskdata.py                            | 10 ++++----
 lib/bblayers/action.py                        |  2 +-
 lib/layerindexlib/__init__.py                 |  4 ++--
 lib/layerindexlib/cooker.py                   |  2 +-
 .../bldcontrol/localhostbecontroller.py       |  4 ++--
 .../orm/management/commands/lsupdates.py      | 12 +++++-----
 .../toastergui/templates/projectconf.html     | 10 ++++----
 lib/toaster/toastergui/views.py               | 18 +++++++-------
 18 files changed, 74 insertions(+), 69 deletions(-)

-- 
2.35.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/4] Replace remaining "blacklist"/"whitelist" usage
  2022-02-17 22:09 [PATCH 0/4] Further inclusive language fixes Scott Murray
@ 2022-02-17 22:09 ` Scott Murray
  2022-02-17 22:09 ` [PATCH 2/4] Replace "abort" usage in task handling Scott Murray
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Scott Murray @ 2022-02-17 22:09 UTC (permalink / raw)
  To: bitbake-devel

In line with the inclusive language migration defined at:

https://wiki.yoctoproject.org/wiki/Inclusive_language

replace the remaining non-backwards-compatibility related usage
of "blacklist"/"whitelist" with "allowed"/"disallowed" in a few
places as appropriate.

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
 lib/bb/fetch2/__init__.py                      |  2 +-
 lib/layerindexlib/__init__.py                  |  4 ++--
 lib/layerindexlib/cooker.py                    |  2 +-
 .../orm/management/commands/lsupdates.py       | 12 ++++++------
 .../toastergui/templates/projectconf.html      | 10 +++++-----
 lib/toaster/toastergui/views.py                | 18 +++++++++---------
 6 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index d099cd10..917adeb2 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -199,7 +199,7 @@ class URI(object):
      file://hostname/absolute/path.diff (would be IETF compliant)
 
     Note that the last case only applies to a list of
-    "whitelisted" schemes (currently only file://), that requires
+    explicitly allowed schemes (currently only file://), that requires
     its URIs to not have a network location.
     """
 
diff --git a/lib/layerindexlib/__init__.py b/lib/layerindexlib/__init__.py
index 08063c57..ac03d898 100644
--- a/lib/layerindexlib/__init__.py
+++ b/lib/layerindexlib/__init__.py
@@ -1278,7 +1278,7 @@ class Recipe(LayerIndexItemObj_LayerBranch):
                     filename, filepath, pn, pv, layerbranch,
                     summary="", description="", section="", license="",
                     homepage="", bugtracker="", provides="", bbclassextend="",
-                    inherits="", blacklisted="", updated=None):
+                    inherits="", disallowed="", updated=None):
         self.id = id
         self.filename = filename
         self.filepath = filepath
@@ -1294,7 +1294,7 @@ class Recipe(LayerIndexItemObj_LayerBranch):
         self.bbclassextend = bbclassextend
         self.inherits = inherits
         self.updated = updated or datetime.datetime.today().isoformat()
-        self.blacklisted = blacklisted
+        self.disallowed = disallowed
         if isinstance(layerbranch, LayerBranch):
             self.layerbranch = layerbranch
         else:
diff --git a/lib/layerindexlib/cooker.py b/lib/layerindexlib/cooker.py
index 2de6e5fa..ced3e063 100644
--- a/lib/layerindexlib/cooker.py
+++ b/lib/layerindexlib/cooker.py
@@ -279,7 +279,7 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin):
                                    summary=pn, description=pn, section='?',
                                    license='?', homepage='?', bugtracker='?',
                                    provides='?', bbclassextend='?', inherits='?',
-                                   blacklisted='?', layerbranch=depBranchId)
+                                   disallowed='?', layerbranch=depBranchId)
 
                     index = addElement("recipes", [recipe], index)
 
diff --git a/lib/toaster/orm/management/commands/lsupdates.py b/lib/toaster/orm/management/commands/lsupdates.py
index 3b950e6e..eb097555 100644
--- a/lib/toaster/orm/management/commands/lsupdates.py
+++ b/lib/toaster/orm/management/commands/lsupdates.py
@@ -87,13 +87,13 @@ class Command(BaseCommand):
 
         # update branches; only those that we already have names listed in the
         # Releases table
-        whitelist_branch_names = [rel.branch_name
-                                  for rel in Release.objects.all()]
-        if len(whitelist_branch_names) == 0:
+        allowed_branch_names = [rel.branch_name
+                                for rel in Release.objects.all()]
+        if len(allowed_branch_names) == 0:
             raise Exception("Failed to make list of branches to fetch")
 
         logger.info("Fetching metadata for %s",
-                    " ".join(whitelist_branch_names))
+                    " ".join(allowed_branch_names))
 
         # We require a non-empty bb.data, but we can fake it with a dictionary
         layerindex = layerindexlib.LayerIndex({"DUMMY" : "VALUE"})
@@ -101,8 +101,8 @@ class Command(BaseCommand):
         http_progress = Spinner()
         http_progress.start()
 
-        if whitelist_branch_names:
-            url_branches = ";branch=%s" % ','.join(whitelist_branch_names)
+        if allowed_branch_names:
+            url_branches = ";branch=%s" % ','.join(allowed_branch_names)
         else:
             url_branches = ""
         layerindex.load_layerindex("%s%s" % (self.apiurl, url_branches))
diff --git a/lib/toaster/toastergui/templates/projectconf.html b/lib/toaster/toastergui/templates/projectconf.html
index bd49f1f5..d62691df 100644
--- a/lib/toaster/toastergui/templates/projectconf.html
+++ b/lib/toaster/toastergui/templates/projectconf.html
@@ -167,8 +167,8 @@
   {% for fstype in vars_fstypes %}
   <input type="hidden" class="js-checkbox-fstypes-list" value="{{fstype}}">
   {% endfor %}
-  {% for b in vars_blacklist %}
-  <input type="hidden" class="js-config-blacklist-name" value="{{b}}">
+  {% for b in vars_disallowed %}
+  <input type="hidden" class="js-config-disallowed-name" value="{{b}}">
   {% endfor %}
   {% for b in vars_managed %}
   <input type="hidden" class="js-config-managed-name" value="{{b}}">
@@ -238,9 +238,9 @@ function validate_new_variable() {
     }
   }
 
-  var blacklist_configvars = document.getElementsByClassName('js-config-blacklist-name');
-  for (var i = 0, length = blacklist_configvars.length; i < length; i++) {
-    if (blacklist_configvars[i].value.toUpperCase() == variable.toUpperCase()) {
+  var disallowed_configvars = document.getElementsByClassName('js-config-disallowed-name');
+  for (var i = 0, length = disallowed_configvars.length; i < length; i++) {
+    if (disallowed_configvars[i].value.toUpperCase() == variable.toUpperCase()) {
       error_msg = "You cannot edit this variable in Toaster because it is set by the build servers";
     }
   }
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index 74f9d569..a571b8cc 100644
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -1683,12 +1683,12 @@ if True:
                 t=request.POST['configvarDel'].strip()
                 pt = ProjectVariable.objects.get(pk = int(t)).delete()
 
-            # return all project settings, filter out blacklist and elsewhere-managed variables
-            vars_managed,vars_fstypes,vars_blacklist = get_project_configvars_context()
+            # return all project settings, filter out disallowed and elsewhere-managed variables
+            vars_managed,vars_fstypes,vars_disallowed = get_project_configvars_context()
             configvars_query = ProjectVariable.objects.filter(project_id = pid).all()
             for var in vars_managed:
                 configvars_query = configvars_query.exclude(name = var)
-            for var in vars_blacklist:
+            for var in vars_disallowed:
                 configvars_query = configvars_query.exclude(name = var)
 
             return_data = {
@@ -1781,7 +1781,7 @@ if True:
             'MACHINE', 'BBLAYERS'
         }
 
-        vars_blacklist  = {
+        vars_disallowed  = {
             'PARALLEL_MAKE','BB_NUMBER_THREADS',
             'BB_DISKMON_DIRS','BB_NUMBER_THREADS','CVS_PROXY_HOST','CVS_PROXY_PORT',
             'PARALLEL_MAKE','TMPDIR',
@@ -1790,7 +1790,7 @@ if True:
 
         vars_fstypes = Target_Image_File.SUFFIXES
 
-        return(vars_managed,sorted(vars_fstypes),vars_blacklist)
+        return(vars_managed,sorted(vars_fstypes),vars_disallowed)
 
     def projectconf(request, pid):
 
@@ -1799,12 +1799,12 @@ if True:
         except Project.DoesNotExist:
             return HttpResponseNotFound("<h1>Project id " + pid + " is unavailable</h1>")
 
-        # remove blacklist and externally managed varaibles from this list
-        vars_managed,vars_fstypes,vars_blacklist = get_project_configvars_context()
+        # remove disallowed and externally managed varaibles from this list
+        vars_managed,vars_fstypes,vars_disallowed = get_project_configvars_context()
         configvars = ProjectVariable.objects.filter(project_id = pid).all()
         for var in vars_managed:
             configvars = configvars.exclude(name = var)
-        for var in vars_blacklist:
+        for var in vars_disallowed:
             configvars = configvars.exclude(name = var)
 
         context = {
@@ -1812,7 +1812,7 @@ if True:
             'configvars':       configvars,
             'vars_managed':     vars_managed,
             'vars_fstypes':     vars_fstypes,
-            'vars_blacklist':   vars_blacklist,
+            'vars_disallowed':  vars_disallowed,
         }
 
         try:
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/4] Replace "abort" usage in task handling
  2022-02-17 22:09 [PATCH 0/4] Further inclusive language fixes Scott Murray
  2022-02-17 22:09 ` [PATCH 1/4] Replace remaining "blacklist"/"whitelist" usage Scott Murray
@ 2022-02-17 22:09 ` Scott Murray
  2022-02-17 22:09 ` [PATCH 3/4] Replace "ABORT" action in BB_DISKMON_DIRS Scott Murray
  2022-02-17 22:09 ` [PATCH 4/4] Replace remaining "abort" usage Scott Murray
  3 siblings, 0 replies; 5+ messages in thread
From: Scott Murray @ 2022-02-17 22:09 UTC (permalink / raw)
  To: bitbake-devel

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.

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
 lib/bb/cooker.py     | 24 ++++++++++++------------
 lib/bb/cookerdata.py |  4 ++--
 lib/bb/main.py       |  2 +-
 lib/bb/runqueue.py   | 12 ++++++------
 lib/bb/taskdata.py   | 10 +++++-----
 5 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index d1d4e325..730575c5 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -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)
 
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index 8d96fc41..c1d1f949 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -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
diff --git a/lib/bb/main.py b/lib/bb/main.py
index 639fc188..93eda363 100755
--- a/lib/bb/main.py
+++ b/lib/bb/main.py
@@ -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.")
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index aedf9354..a7a84630 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -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)
diff --git a/lib/bb/taskdata.py b/lib/bb/taskdata.py
index 7bfcdb84..66545a65 100644
--- a/lib/bb/taskdata.py
+++ b/lib/bb/taskdata.py
@@ -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)
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4] Replace "ABORT" action in BB_DISKMON_DIRS
  2022-02-17 22:09 [PATCH 0/4] Further inclusive language fixes Scott Murray
  2022-02-17 22:09 ` [PATCH 1/4] Replace remaining "blacklist"/"whitelist" usage Scott Murray
  2022-02-17 22:09 ` [PATCH 2/4] Replace "abort" usage in task handling Scott Murray
@ 2022-02-17 22:09 ` Scott Murray
  2022-02-17 22:09 ` [PATCH 4/4] Replace remaining "abort" usage Scott Murray
  3 siblings, 0 replies; 5+ messages in thread
From: Scott Murray @ 2022-02-17 22:09 UTC (permalink / raw)
  To: bitbake-devel

In line with the inclusive language migration defined at:

https://wiki.yoctoproject.org/wiki/Inclusive_language

replace the "ABORT" action in BB_DISKMON_DIRS entries with "HALT".
In order to ease migration, code has been added to warn users to
update their configurations if the old name is used, as opposed to
to throwing an error.

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
 .../bitbake-user-manual-ref-variables.rst       | 10 +++++-----
 lib/bb/event.py                                 |  2 +-
 lib/bb/monitordisk.py                           | 17 +++++++++++------
 3 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
index 7601d15a..315086a6 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -138,7 +138,7 @@ overview of their function and contents.
          where:
 
             <action> is:
-               ABORT:     Immediately abort the build when
+               HALT:      Immediately halt the build when
                           a threshold is broken.
                STOPTASKS: Stop the build after the currently
                           executing tasks have finished when
@@ -169,13 +169,13 @@ overview of their function and contents.
 
       Here are some examples::
 
-         BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
+         BB_DISKMON_DIRS = "HALT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
          BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
-         BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
+         BB_DISKMON_DIRS = "HALT,${TMPDIR},,100K"
 
       The first example works only if you also set the
       :term:`BB_DISKMON_WARNINTERVAL`
-      variable. This example causes the build system to immediately abort
+      variable. This example causes the build system to immediately halt
       when either the disk space in ``${TMPDIR}`` drops below 1 Gbyte or
       the available free inodes drops below 100 Kbytes. Because two
       directories are provided with the variable, the build system also
@@ -189,7 +189,7 @@ overview of their function and contents.
       directory drops below 1 Gbyte. No disk monitoring occurs for the free
       inodes in this case.
 
-      The final example immediately aborts the build when the number of
+      The final example immediately halts the build when the number of
       free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
       disk space monitoring for the directory itself occurs in this case.
 
diff --git a/lib/bb/event.py b/lib/bb/event.py
index 0454c753..b85a434d 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -486,7 +486,7 @@ class BuildCompleted(BuildBase, OperationCompleted):
         BuildBase.__init__(self, n, p, failures)
 
 class DiskFull(Event):
-    """Disk full case build aborted"""
+    """Disk full case build halted"""
     def __init__(self, dev, type, freespace, mountpoint):
         Event.__init__(self)
         self._dev = dev
diff --git a/lib/bb/monitordisk.py b/lib/bb/monitordisk.py
index 98f2109e..8d8cfbb9 100644
--- a/lib/bb/monitordisk.py
+++ b/lib/bb/monitordisk.py
@@ -76,7 +76,12 @@ def getDiskData(BBDirs):
             return None
 
         action = pathSpaceInodeRe.group(1)
-        if action not in ("ABORT", "STOPTASKS", "WARN"):
+        if action == "ABORT":
+            # Emit a deprecation warning
+            logger.warnonce("The BB_DISKMON_DIRS \"ABORT\" action has been been renamed to \"HALT\", update configuration")
+            action = "HALT"
+
+        if action not in ("HALT", "STOPTASKS", "WARN"):
             printErr("Unknown disk space monitor action: %s" % action)
             return None
 
@@ -177,7 +182,7 @@ class diskMonitor:
                     # use them to avoid printing too many warning messages
                     self.preFreeS = {}
                     self.preFreeI = {}
-                    # This is for STOPTASKS and ABORT, to avoid printing the message
+                    # This is for STOPTASKS and HALT, to avoid printing the message
                     # repeatedly while waiting for the tasks to finish
                     self.checked = {}
                     for k in self.devDict:
@@ -219,8 +224,8 @@ class diskMonitor:
                         self.checked[k] = True
                         rq.finish_runqueue(False)
                         bb.event.fire(bb.event.DiskFull(dev, 'disk', freeSpace, path), self.configuration)
-                    elif action == "ABORT" and not self.checked[k]:
-                        logger.error("Immediately abort since the disk space monitor action is \"ABORT\"!")
+                    elif action == "HALT" and not self.checked[k]:
+                        logger.error("Immediately halt since the disk space monitor action is \"HALT\"!")
                         self.checked[k] = True
                         rq.finish_runqueue(True)
                         bb.event.fire(bb.event.DiskFull(dev, 'disk', freeSpace, path), self.configuration)
@@ -245,8 +250,8 @@ class diskMonitor:
                         self.checked[k] = True
                         rq.finish_runqueue(False)
                         bb.event.fire(bb.event.DiskFull(dev, 'inode', freeInode, path), self.configuration)
-                    elif action  == "ABORT" and not self.checked[k]:
-                        logger.error("Immediately abort since the disk space monitor action is \"ABORT\"!")
+                    elif action  == "HALT" and not self.checked[k]:
+                        logger.error("Immediately halt since the disk space monitor action is \"HALT\"!")
                         self.checked[k] = True
                         rq.finish_runqueue(True)
                         bb.event.fire(bb.event.DiskFull(dev, 'inode', freeInode, path), self.configuration)
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/4] Replace remaining "abort" usage
  2022-02-17 22:09 [PATCH 0/4] Further inclusive language fixes Scott Murray
                   ` (2 preceding siblings ...)
  2022-02-17 22:09 ` [PATCH 3/4] Replace "ABORT" action in BB_DISKMON_DIRS Scott Murray
@ 2022-02-17 22:09 ` Scott Murray
  3 siblings, 0 replies; 5+ messages in thread
From: Scott Murray @ 2022-02-17 22:09 UTC (permalink / raw)
  To: bitbake-devel

In line with the inclusive language migration defined at:

https://wiki.yoctoproject.org/wiki/Inclusive_language

replace the remaining usage of "abort" in documentation, error
messages, and comments with halt/fail/exit as appropriate.
A couple of external Javascript API calls in Toaster remain, as
they cannot currently be changed.

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
 bin/toaster                                                   | 4 ++--
 doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst | 2 +-
 lib/bb/siggen.py                                              | 2 +-
 lib/bblayers/action.py                                        | 2 +-
 lib/toaster/bldcontrol/localhostbecontroller.py               | 4 ++--
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/bin/toaster b/bin/toaster
index 8711014c..558a8195 100755
--- a/bin/toaster
+++ b/bin/toaster
@@ -33,7 +33,7 @@ databaseCheck()
     $MANAGE migrate --noinput || retval=1
 
     if [ $retval -eq 1 ]; then
-        echo "Failed migrations, aborting system start" 1>&2
+        echo "Failed migrations, halting system start" 1>&2
         return $retval
     fi
     # Make sure that checksettings can pick up any value for TEMPLATECONF
@@ -41,7 +41,7 @@ databaseCheck()
     $MANAGE checksettings --traceback || retval=1
 
     if [ $retval -eq 1 ]; then
-        printf "\nError while checking settings; aborting\n"
+        printf "\nError while checking settings; exiting\n"
         return $retval
     fi
 
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
index 315086a6..59a9de2f 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -735,7 +735,7 @@ overview of their function and contents.
          "
 
       This next example shows an error message that occurs because invalid
-      entries are found, which cause parsing to abort::
+      entries are found, which cause parsing to fail::
 
          ERROR: BBFILES_DYNAMIC entries must be of the form {!}<collection name>:<filename pattern>, not:
          /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index d0988e0e..ebba4525 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -584,7 +584,7 @@ class SignatureGeneratorUniHashMixIn(object):
         if self.setscenetasks and tid not in self.setscenetasks:
             return
 
-        # This can happen if locked sigs are in action. Detect and just abort
+        # This can happen if locked sigs are in action. Detect and just exit
         if taskhash != self.taskhash[tid]:
             return
 
diff --git a/lib/bblayers/action.py b/lib/bblayers/action.py
index f05f5d33..6723e2c6 100644
--- a/lib/bblayers/action.py
+++ b/lib/bblayers/action.py
@@ -53,7 +53,7 @@ class ActionPlugin(LayerPlugin):
                 except (bb.tinfoil.TinfoilUIException, bb.BBHandledException):
                     # Restore the back up copy of bblayers.conf
                     shutil.copy2(backup, bblayers_conf)
-                    bb.fatal("Parse failure with the specified layer added, aborting.")
+                    bb.fatal("Parse failure with the specified layer added, exiting.")
                 else:
                     for item in notadded:
                         sys.stderr.write("Specified layer %s is already in BBLAYERS\n" % item)
diff --git a/lib/toaster/bldcontrol/localhostbecontroller.py b/lib/toaster/bldcontrol/localhostbecontroller.py
index 75674ccb..577e765f 100644
--- a/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -200,7 +200,7 @@ class LocalhostBEController(BuildEnvironmentController):
                 localdirpath = os.path.join(localdirname, dirpath)
                 logger.debug("localhostbecontroller: localdirpath expects '%s'" % localdirpath)
                 if not os.path.exists(localdirpath):
-                    raise BuildSetupException("Cannot find layer git path '%s' in checked out repository '%s:%s'. Aborting." % (localdirpath, giturl, commit))
+                    raise BuildSetupException("Cannot find layer git path '%s' in checked out repository '%s:%s'. Exiting." % (localdirpath, giturl, commit))
 
                 if name != "bitbake":
                     layerlist.append("%03d:%s" % (index,localdirpath.rstrip("/")))
@@ -467,7 +467,7 @@ class LocalhostBEController(BuildEnvironmentController):
             logger.debug("localhostbecontroller: waiting for bblock content to appear")
             time.sleep(1)
         else:
-            raise BuildSetupException("Cannot find bitbake server lock file '%s'. Aborting." % bblock)
+            raise BuildSetupException("Cannot find bitbake server lock file '%s'. Exiting." % bblock)
 
         with open(bblock) as fplock:
             for line in fplock:
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-17 22:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-17 22:09 [PATCH 0/4] Further inclusive language fixes Scott Murray
2022-02-17 22:09 ` [PATCH 1/4] Replace remaining "blacklist"/"whitelist" usage Scott Murray
2022-02-17 22:09 ` [PATCH 2/4] Replace "abort" usage in task handling Scott Murray
2022-02-17 22:09 ` [PATCH 3/4] Replace "ABORT" action in BB_DISKMON_DIRS Scott Murray
2022-02-17 22:09 ` [PATCH 4/4] Replace remaining "abort" usage Scott Murray

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.