bitbake: lib: Replace remaining "blacklist"/"whitelist" usage

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.

(Bitbake rev: f579fb8c23d2919d25641fa4234f8a1e9c06a922)

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Murray 2022-02-17 17:09:32 -05:00 committed by Richard Purdie
parent f2fc11cad7
commit 09a62d96c7
6 changed files with 24 additions and 24 deletions

View File

@ -199,7 +199,7 @@ class URI(object):
file://hostname/absolute/path.diff (would be IETF compliant) file://hostname/absolute/path.diff (would be IETF compliant)
Note that the last case only applies to a list of 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. its URIs to not have a network location.
""" """

View File

@ -1278,7 +1278,7 @@ class Recipe(LayerIndexItemObj_LayerBranch):
filename, filepath, pn, pv, layerbranch, filename, filepath, pn, pv, layerbranch,
summary="", description="", section="", license="", summary="", description="", section="", license="",
homepage="", bugtracker="", provides="", bbclassextend="", homepage="", bugtracker="", provides="", bbclassextend="",
inherits="", blacklisted="", updated=None): inherits="", disallowed="", updated=None):
self.id = id self.id = id
self.filename = filename self.filename = filename
self.filepath = filepath self.filepath = filepath
@ -1294,7 +1294,7 @@ class Recipe(LayerIndexItemObj_LayerBranch):
self.bbclassextend = bbclassextend self.bbclassextend = bbclassextend
self.inherits = inherits self.inherits = inherits
self.updated = updated or datetime.datetime.today().isoformat() self.updated = updated or datetime.datetime.today().isoformat()
self.blacklisted = blacklisted self.disallowed = disallowed
if isinstance(layerbranch, LayerBranch): if isinstance(layerbranch, LayerBranch):
self.layerbranch = layerbranch self.layerbranch = layerbranch
else: else:

View File

@ -279,7 +279,7 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin):
summary=pn, description=pn, section='?', summary=pn, description=pn, section='?',
license='?', homepage='?', bugtracker='?', license='?', homepage='?', bugtracker='?',
provides='?', bbclassextend='?', inherits='?', provides='?', bbclassextend='?', inherits='?',
blacklisted='?', layerbranch=depBranchId) disallowed='?', layerbranch=depBranchId)
index = addElement("recipes", [recipe], index) index = addElement("recipes", [recipe], index)

View File

@ -87,13 +87,13 @@ class Command(BaseCommand):
# update branches; only those that we already have names listed in the # update branches; only those that we already have names listed in the
# Releases table # Releases table
whitelist_branch_names = [rel.branch_name allowed_branch_names = [rel.branch_name
for rel in Release.objects.all()] for rel in Release.objects.all()]
if len(whitelist_branch_names) == 0: if len(allowed_branch_names) == 0:
raise Exception("Failed to make list of branches to fetch") raise Exception("Failed to make list of branches to fetch")
logger.info("Fetching metadata for %s", 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 # We require a non-empty bb.data, but we can fake it with a dictionary
layerindex = layerindexlib.LayerIndex({"DUMMY" : "VALUE"}) layerindex = layerindexlib.LayerIndex({"DUMMY" : "VALUE"})
@ -101,8 +101,8 @@ class Command(BaseCommand):
http_progress = Spinner() http_progress = Spinner()
http_progress.start() http_progress.start()
if whitelist_branch_names: if allowed_branch_names:
url_branches = ";branch=%s" % ','.join(whitelist_branch_names) url_branches = ";branch=%s" % ','.join(allowed_branch_names)
else: else:
url_branches = "" url_branches = ""
layerindex.load_layerindex("%s%s" % (self.apiurl, url_branches)) layerindex.load_layerindex("%s%s" % (self.apiurl, url_branches))

View File

@ -167,8 +167,8 @@
{% for fstype in vars_fstypes %} {% for fstype in vars_fstypes %}
<input type="hidden" class="js-checkbox-fstypes-list" value="{{fstype}}"> <input type="hidden" class="js-checkbox-fstypes-list" value="{{fstype}}">
{% endfor %} {% endfor %}
{% for b in vars_blacklist %} {% for b in vars_disallowed %}
<input type="hidden" class="js-config-blacklist-name" value="{{b}}"> <input type="hidden" class="js-config-disallowed-name" value="{{b}}">
{% endfor %} {% endfor %}
{% for b in vars_managed %} {% for b in vars_managed %}
<input type="hidden" class="js-config-managed-name" value="{{b}}"> <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'); var disallowed_configvars = document.getElementsByClassName('js-config-disallowed-name');
for (var i = 0, length = blacklist_configvars.length; i < length; i++) { for (var i = 0, length = disallowed_configvars.length; i < length; i++) {
if (blacklist_configvars[i].value.toUpperCase() == variable.toUpperCase()) { 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"; error_msg = "You cannot edit this variable in Toaster because it is set by the build servers";
} }
} }

View File

@ -1683,12 +1683,12 @@ if True:
t=request.POST['configvarDel'].strip() t=request.POST['configvarDel'].strip()
pt = ProjectVariable.objects.get(pk = int(t)).delete() pt = ProjectVariable.objects.get(pk = int(t)).delete()
# return all project settings, filter out blacklist and elsewhere-managed variables # return all project settings, filter out disallowed and elsewhere-managed variables
vars_managed,vars_fstypes,vars_blacklist = get_project_configvars_context() vars_managed,vars_fstypes,vars_disallowed = get_project_configvars_context()
configvars_query = ProjectVariable.objects.filter(project_id = pid).all() configvars_query = ProjectVariable.objects.filter(project_id = pid).all()
for var in vars_managed: for var in vars_managed:
configvars_query = configvars_query.exclude(name = var) configvars_query = configvars_query.exclude(name = var)
for var in vars_blacklist: for var in vars_disallowed:
configvars_query = configvars_query.exclude(name = var) configvars_query = configvars_query.exclude(name = var)
return_data = { return_data = {
@ -1781,7 +1781,7 @@ if True:
'MACHINE', 'BBLAYERS' 'MACHINE', 'BBLAYERS'
} }
vars_blacklist = { vars_disallowed = {
'PARALLEL_MAKE','BB_NUMBER_THREADS', 'PARALLEL_MAKE','BB_NUMBER_THREADS',
'BB_DISKMON_DIRS','BB_NUMBER_THREADS','CVS_PROXY_HOST','CVS_PROXY_PORT', 'BB_DISKMON_DIRS','BB_NUMBER_THREADS','CVS_PROXY_HOST','CVS_PROXY_PORT',
'PARALLEL_MAKE','TMPDIR', 'PARALLEL_MAKE','TMPDIR',
@ -1790,7 +1790,7 @@ if True:
vars_fstypes = Target_Image_File.SUFFIXES 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): def projectconf(request, pid):
@ -1799,12 +1799,12 @@ if True:
except Project.DoesNotExist: except Project.DoesNotExist:
return HttpResponseNotFound("<h1>Project id " + pid + " is unavailable</h1>") return HttpResponseNotFound("<h1>Project id " + pid + " is unavailable</h1>")
# remove blacklist and externally managed varaibles from this list # remove disallowed and externally managed varaibles from this list
vars_managed,vars_fstypes,vars_blacklist = get_project_configvars_context() vars_managed,vars_fstypes,vars_disallowed = get_project_configvars_context()
configvars = ProjectVariable.objects.filter(project_id = pid).all() configvars = ProjectVariable.objects.filter(project_id = pid).all()
for var in vars_managed: for var in vars_managed:
configvars = configvars.exclude(name = var) configvars = configvars.exclude(name = var)
for var in vars_blacklist: for var in vars_disallowed:
configvars = configvars.exclude(name = var) configvars = configvars.exclude(name = var)
context = { context = {
@ -1812,7 +1812,7 @@ if True:
'configvars': configvars, 'configvars': configvars,
'vars_managed': vars_managed, 'vars_managed': vars_managed,
'vars_fstypes': vars_fstypes, 'vars_fstypes': vars_fstypes,
'vars_blacklist': vars_blacklist, 'vars_disallowed': vars_disallowed,
} }
try: try: