mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
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:
parent
f2fc11cad7
commit
09a62d96c7
|
@ -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.
|
||||
"""
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user