From patchwork Thu Feb 17 22:09:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Murray X-Patchwork-Id: 3740 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3662DC433F5 for ; Thu, 17 Feb 2022 22:09:49 +0000 (UTC) Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by mx.groups.io with SMTP id smtpd.web09.3386.1645135788562633780 for ; Thu, 17 Feb 2022 14:09:48 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=IDRLAq9k; spf=pass (domain: konsulko.com, ip: 209.85.219.52, mailfrom: scott.murray@konsulko.com) Received: by mail-qv1-f52.google.com with SMTP id p7so11068247qvk.11 for ; Thu, 17 Feb 2022 14:09:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Qs3f77h+dXGwhKe95juJctNgeeVckFYlixJ0Bl5N/90=; b=IDRLAq9kVHPto2Fs48Gu77QVHOyaugNk4ReHNm7wdJZqseEcBqM0HlXjBsX9IRrHJ/ 6CIwdyaUU9Ur5OGssZpKteLbPmxZlFurnPV3q5C+1VAJpgXicA2T3TIAKbsFgEy9avVs nfEU4i7okHZfSejXb5KxUZ04dmthWJmrRYZZY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Qs3f77h+dXGwhKe95juJctNgeeVckFYlixJ0Bl5N/90=; b=Cmxnuo2vrFVXM6mGnAy4vtRuovsnhwBwtlD1Ax/S9elmNy1RW4AT6R9xaEbnH1IPWx kOaY3mubrdkwXz3JOuRjGTCLncVThSCcs0fVPQNhN+9AvFRrX19jBxyjO8oHu0HbTZWa fhBNG7T+6HDfyXz397yRJWipDkbiqk6b8gFKlCkleFiebpPqug1wxrMNnXeNijKrkzKT k/+MVDCwTWAADI36brkA45Kr2ns7eIORppbwPTmaPPZfVNuKjRPQF7v7jE05I+MYstxJ Qslh0A9Hqc7fnlpDAPLYkwsVXw7MVxn4SuBq5LK4vMzJRUJPINVacqudDvKLurWLDQJs 8bEw== X-Gm-Message-State: AOAM530bw97dfkx4//sF1ISsgUmYLLYLYWfcnF6dyobejf8MiJeZYU1K kWMEmW4nJeaJuHeIKXSTo6fnac1hpC7wWQ== X-Google-Smtp-Source: ABdhPJx0TEtnoDUn+rasJd6lcGh6VrzntJE+5cIysjmDXSWeCMEdTjqKngW7y43jchnjBaeFmsk2rA== X-Received: by 2002:a05:622a:20a:b0:2d7:fbbe:fdb with SMTP id b10-20020a05622a020a00b002d7fbbe0fdbmr4225689qtx.506.1645135786980; Thu, 17 Feb 2022 14:09:46 -0800 (PST) Received: from ghidorah.spiteful.org (192-0-174-222.cpe.teksavvy.com. [192.0.174.222]) by smtp.gmail.com with ESMTPSA id q15sm5127572qtn.41.2022.02.17.14.09.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 14:09:46 -0800 (PST) From: Scott Murray To: bitbake-devel@lists.openembedded.org Subject: [PATCH 1/4] Replace remaining "blacklist"/"whitelist" usage Date: Thu, 17 Feb 2022 17:09:32 -0500 Message-Id: <3180b994885ba51b3ccdb332854efab895eb35f0.1645135230.git.scott.murray@konsulko.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 17 Feb 2022 22:09:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/13361 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 --- 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 %} {% endfor %} - {% for b in vars_blacklist %} - + {% for b in vars_disallowed %} + {% endfor %} {% for b in vars_managed %} @@ -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("

Project id " + pid + " is unavailable

") - # 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: From patchwork Thu Feb 17 22:09:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Murray X-Patchwork-Id: 3741 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FE3EC433EF for ; Thu, 17 Feb 2022 22:09:50 +0000 (UTC) Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com [209.85.219.41]) by mx.groups.io with SMTP id smtpd.web10.3292.1645135789718205120 for ; Thu, 17 Feb 2022 14:09:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=IfN53gGi; spf=pass (domain: konsulko.com, ip: 209.85.219.41, mailfrom: scott.murray@konsulko.com) Received: by mail-qv1-f41.google.com with SMTP id c14so11065876qvl.12 for ; Thu, 17 Feb 2022 14:09:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=LZwR1OF5IeWR925Iw4u5lqy6Mseb0+6q3nQOlgAeFa0=; b=IfN53gGiaUGoddvLWV0xr/NA6M/RcD4Wz4nuG6d/ulD78ncGwPB8CcNMTBxyWP3qON Akzq7hvgdT45Uo3UEWm5uvSwbdqee7pudp6RFVR2AqCRbm5ztSIu8UmV84ZXdlbOABsV BGtwRWj+68te6Ij/QNnesiBtJRCqqYHF6WjkA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LZwR1OF5IeWR925Iw4u5lqy6Mseb0+6q3nQOlgAeFa0=; b=rcGU8/EGTdhO425Ga2yfNxKvzooLbIkyqMjm+PXoDjbxXvuN1mObUH+/8t1DVUvaUi +HZxCbBoeiLbwkOVI8ix3r/LK8PTvDpFe0jlyZzNhTFbNTsUVL3OerIPXVGpDFM5Ybdu U6au6fmliqx5vVsPr+cp91AB+7RgLdL71Vs9Y3gW0pSkmTg3HUOTIvCYFQ8d6R95Ug/s Um76UfqGDvcMB+ffIQgTFuZx+2d2TGYDy6o+PNsqMwAV0UHFF07mbuXHLLtSoZELYMFh XPaQ/YV+VDzVzF2FdGc5Npak6rQ2in1A2vLWs5JFR979X78/3Zlr5duMdJ3PdbOtEjTD ECwA== X-Gm-Message-State: AOAM533s7kQ95qpgqVzrkR82u0azv2NNIKY1y/r+QQ7q+7BYmHpF8Etn DSzTIe3dj6xviFBe9w4xwOg0W4ozn2v7vQ== X-Google-Smtp-Source: ABdhPJyVdZjrOxtFj3vdKNTO4vTy4LfTN1A01tfuPz8iTeGAxm/6w4RgBRABFDDdmipo2Qj42R9nAw== X-Received: by 2002:ac8:75d0:0:b0:2db:aad5:ec47 with SMTP id z16-20020ac875d0000000b002dbaad5ec47mr4283084qtq.390.1645135788211; Thu, 17 Feb 2022 14:09:48 -0800 (PST) Received: from ghidorah.spiteful.org (192-0-174-222.cpe.teksavvy.com. [192.0.174.222]) by smtp.gmail.com with ESMTPSA id q15sm5127572qtn.41.2022.02.17.14.09.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 14:09:47 -0800 (PST) From: Scott Murray To: bitbake-devel@lists.openembedded.org Subject: [PATCH 2/4] Replace "abort" usage in task handling Date: Thu, 17 Feb 2022 17:09:33 -0500 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 17 Feb 2022 22:09:50 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/13362 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 --- 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) From patchwork Thu Feb 17 22:09:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Murray X-Patchwork-Id: 3742 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D4DEC433FE for ; Thu, 17 Feb 2022 22:09:52 +0000 (UTC) Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.44]) by mx.groups.io with SMTP id smtpd.web09.3387.1645135790914260368 for ; Thu, 17 Feb 2022 14:09:51 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=sm2F8pJ1; spf=pass (domain: konsulko.com, ip: 209.85.219.44, mailfrom: scott.murray@konsulko.com) Received: by mail-qv1-f44.google.com with SMTP id o5so11108547qvm.3 for ; Thu, 17 Feb 2022 14:09:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=R73oPIKQkRvztHPs+7Or+xALhdsieIDsFg7IxQ6+moc=; b=sm2F8pJ10FhC7UWpdW6SGq4uyJUeNUAioKv9t4kTZWzUut65LlxF/7YaIYuV1632/K ufgd7H6ylctmcztaVqCPHfAy0OQH6L2Ug4y7BADg4pmgE4+px6L6OOaDPhVFNJAKw7TR Y5aQWEJP7JdS/GLLZ2yWlN0DHeLkC13jJL+7c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=R73oPIKQkRvztHPs+7Or+xALhdsieIDsFg7IxQ6+moc=; b=T9W0WI2LZVjnDhc78AbSrceVemiGzKRVxULj1YbS9iLmey59RM/QX1+ZoXauZV+0vG 2jtEfkxQ+Va3qQd4MW8f6XGb5azCACN3lR3206Al+OSRmi/kzBoPYSnP+P8HC7spVK2k qixScgTCRdKYepYSL56QhAaZqbTJH9LFAFBlTrDWSXvr2zrsYa7Ne6RuX3WEr9QnXt76 QlxhLCng4ynPcvDO+36wMIQjlFdSrecU/9RWfe7hjfjxThgVlpICoFONyqYUWTE+sYGd qO1mDglJNHl8C8cemQ1sL3rVrY25oL1q6gsyNHtLsjo3c1GGGtDIAsLSllLgfII7mEhK GJXQ== X-Gm-Message-State: AOAM530JeYkufabHFlSaPk7UAIwzoxI9MiNzD//bbS3rkHa8XuOVOfcV lgKGhEzK8Q6UgTUcpu6Bsc70tqANTE3FTQ== X-Google-Smtp-Source: ABdhPJylr0YjQwT8Em4UPuDdN/cAASqgkHwMzbhYvPA9ntqwNZud/NBGhCmoRCeZxjmbs3SigCBdgQ== X-Received: by 2002:a05:6214:238b:b0:430:842c:1863 with SMTP id fw11-20020a056214238b00b00430842c1863mr3647654qvb.105.1645135789433; Thu, 17 Feb 2022 14:09:49 -0800 (PST) Received: from ghidorah.spiteful.org (192-0-174-222.cpe.teksavvy.com. [192.0.174.222]) by smtp.gmail.com with ESMTPSA id q15sm5127572qtn.41.2022.02.17.14.09.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 14:09:48 -0800 (PST) From: Scott Murray To: bitbake-devel@lists.openembedded.org Subject: [PATCH 3/4] Replace "ABORT" action in BB_DISKMON_DIRS Date: Thu, 17 Feb 2022 17:09:34 -0500 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 17 Feb 2022 22:09:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/13363 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 --- .../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: 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) From patchwork Thu Feb 17 22:09:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Murray X-Patchwork-Id: 3743 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D86DC433EF for ; Thu, 17 Feb 2022 22:09:53 +0000 (UTC) Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by mx.groups.io with SMTP id smtpd.web08.3371.1645135792051729795 for ; Thu, 17 Feb 2022 14:09:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=IyW0TXqh; spf=pass (domain: konsulko.com, ip: 209.85.219.52, mailfrom: scott.murray@konsulko.com) Received: by mail-qv1-f52.google.com with SMTP id d7so11103459qvk.2 for ; Thu, 17 Feb 2022 14:09:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=8HRXohnY1cVMFojdtKHpUzbAZ+dM++RAuGEmcFGkdlE=; b=IyW0TXqhEEn+QeBduf6AaMDJFOaztKT3C7Ze8E3J4gXo4lNyHp072hhG7mrtQgX9gU 4BxvHIe6XQvtccPnICQYjhAeCK8jSEauY08K2P2ElEjvOI54i2XzIs0MztNJ8KNNw++a 79c/hFnwNxGPw50p7RG5ekd2lvvkMiLA5qAfo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8HRXohnY1cVMFojdtKHpUzbAZ+dM++RAuGEmcFGkdlE=; b=LDuctaCjlV279GnHWvCfvA0chcrbLdHc5qxgWdesrcpxxPpgBbGolFCm9xuUgr1Z0H RoE14JIUgSs6j637U3MEuA1gz5eWRfoF8ERiYZSYsDPU/fGG5+ucdo6p7Ow5WzIfwWEY Hg0dpgcPp7uUv1L99gV6h7nNtDqKckkKG1J/NZA18IppEzSJwRYHC73Pf2CH4ZKPEdJ1 V8CFS337gFpFJCq66zThP1PxHyr6x9JOkqLSfBZpmBQmWNEty8zSZwAX6hLu6aI3xuYk RXqsEjUKY50YflckVRb2kJfegoSAhhgLiMh0i+wxKiVooZrP39IcYcsCiv1WxGqaljIe nCtQ== X-Gm-Message-State: AOAM5303lsewDypraWjvS8iaOAxN8eCIFMLRkS2yRDZ5cVq1sfcRgkFV 9JnRh4vLsLDx/AHqsvKlaNkvIM2/aiCo6w== X-Google-Smtp-Source: ABdhPJy/6MrOSjPr+dUakYF555qAozuWf6jTotnLxFOr3Ci6T03gwebZRPOTS8s7VbOVwTBnhXCUUg== X-Received: by 2002:a05:6214:250a:b0:42c:fa1:3c97 with SMTP id gf10-20020a056214250a00b0042c0fa13c97mr3832381qvb.60.1645135790628; Thu, 17 Feb 2022 14:09:50 -0800 (PST) Received: from ghidorah.spiteful.org (192-0-174-222.cpe.teksavvy.com. [192.0.174.222]) by smtp.gmail.com with ESMTPSA id q15sm5127572qtn.41.2022.02.17.14.09.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 14:09:50 -0800 (PST) From: Scott Murray To: bitbake-devel@lists.openembedded.org Subject: [PATCH 4/4] Replace remaining "abort" usage Date: Thu, 17 Feb 2022 17:09:35 -0500 Message-Id: <039ef76f550ad873d1f625a8db27b653ab2b2d3e.1645135230.git.scott.murray@konsulko.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 17 Feb 2022 22:09:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/13364 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 --- 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 {!}:, 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: