diff options
author | Scott Murray <scott.murray@konsulko.com> | 2022-02-17 17:09:32 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-21 23:37:26 +0000 |
commit | 09a62d96c76333f8abda1d28156378e42630fd9a (patch) | |
tree | 0604ebe06323b96568c179388ba1bead48884715 /bitbake/lib/toaster | |
parent | f2fc11cad737f1da2cbee45c645e1b87225c85c7 (diff) | |
download | poky-09a62d96c76333f8abda1d28156378e42630fd9a.tar.gz |
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>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r-- | bitbake/lib/toaster/orm/management/commands/lsupdates.py | 12 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/projectconf.html | 10 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/views.py | 18 |
3 files changed, 20 insertions, 20 deletions
diff --git a/bitbake/lib/toaster/orm/management/commands/lsupdates.py b/bitbake/lib/toaster/orm/management/commands/lsupdates.py index 3b950e6e15..eb097555e2 100644 --- a/bitbake/lib/toaster/orm/management/commands/lsupdates.py +++ b/bitbake/lib/toaster/orm/management/commands/lsupdates.py | |||
@@ -87,13 +87,13 @@ class Command(BaseCommand): | |||
87 | 87 | ||
88 | # update branches; only those that we already have names listed in the | 88 | # update branches; only those that we already have names listed in the |
89 | # Releases table | 89 | # Releases table |
90 | whitelist_branch_names = [rel.branch_name | 90 | allowed_branch_names = [rel.branch_name |
91 | for rel in Release.objects.all()] | 91 | for rel in Release.objects.all()] |
92 | if len(whitelist_branch_names) == 0: | 92 | if len(allowed_branch_names) == 0: |
93 | raise Exception("Failed to make list of branches to fetch") | 93 | raise Exception("Failed to make list of branches to fetch") |
94 | 94 | ||
95 | logger.info("Fetching metadata for %s", | 95 | logger.info("Fetching metadata for %s", |
96 | " ".join(whitelist_branch_names)) | 96 | " ".join(allowed_branch_names)) |
97 | 97 | ||
98 | # We require a non-empty bb.data, but we can fake it with a dictionary | 98 | # We require a non-empty bb.data, but we can fake it with a dictionary |
99 | layerindex = layerindexlib.LayerIndex({"DUMMY" : "VALUE"}) | 99 | layerindex = layerindexlib.LayerIndex({"DUMMY" : "VALUE"}) |
@@ -101,8 +101,8 @@ class Command(BaseCommand): | |||
101 | http_progress = Spinner() | 101 | http_progress = Spinner() |
102 | http_progress.start() | 102 | http_progress.start() |
103 | 103 | ||
104 | if whitelist_branch_names: | 104 | if allowed_branch_names: |
105 | url_branches = ";branch=%s" % ','.join(whitelist_branch_names) | 105 | url_branches = ";branch=%s" % ','.join(allowed_branch_names) |
106 | else: | 106 | else: |
107 | url_branches = "" | 107 | url_branches = "" |
108 | layerindex.load_layerindex("%s%s" % (self.apiurl, url_branches)) | 108 | layerindex.load_layerindex("%s%s" % (self.apiurl, url_branches)) |
diff --git a/bitbake/lib/toaster/toastergui/templates/projectconf.html b/bitbake/lib/toaster/toastergui/templates/projectconf.html index bd49f1f585..d62691df1d 100644 --- a/bitbake/lib/toaster/toastergui/templates/projectconf.html +++ b/bitbake/lib/toaster/toastergui/templates/projectconf.html | |||
@@ -167,8 +167,8 @@ | |||
167 | {% for fstype in vars_fstypes %} | 167 | {% for fstype in vars_fstypes %} |
168 | <input type="hidden" class="js-checkbox-fstypes-list" value="{{fstype}}"> | 168 | <input type="hidden" class="js-checkbox-fstypes-list" value="{{fstype}}"> |
169 | {% endfor %} | 169 | {% endfor %} |
170 | {% for b in vars_blacklist %} | 170 | {% for b in vars_disallowed %} |
171 | <input type="hidden" class="js-config-blacklist-name" value="{{b}}"> | 171 | <input type="hidden" class="js-config-disallowed-name" value="{{b}}"> |
172 | {% endfor %} | 172 | {% endfor %} |
173 | {% for b in vars_managed %} | 173 | {% for b in vars_managed %} |
174 | <input type="hidden" class="js-config-managed-name" value="{{b}}"> | 174 | <input type="hidden" class="js-config-managed-name" value="{{b}}"> |
@@ -238,9 +238,9 @@ function validate_new_variable() { | |||
238 | } | 238 | } |
239 | } | 239 | } |
240 | 240 | ||
241 | var blacklist_configvars = document.getElementsByClassName('js-config-blacklist-name'); | 241 | var disallowed_configvars = document.getElementsByClassName('js-config-disallowed-name'); |
242 | for (var i = 0, length = blacklist_configvars.length; i < length; i++) { | 242 | for (var i = 0, length = disallowed_configvars.length; i < length; i++) { |
243 | if (blacklist_configvars[i].value.toUpperCase() == variable.toUpperCase()) { | 243 | if (disallowed_configvars[i].value.toUpperCase() == variable.toUpperCase()) { |
244 | error_msg = "You cannot edit this variable in Toaster because it is set by the build servers"; | 244 | error_msg = "You cannot edit this variable in Toaster because it is set by the build servers"; |
245 | } | 245 | } |
246 | } | 246 | } |
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 74f9d56963..a571b8cc18 100644 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -1683,12 +1683,12 @@ if True: | |||
1683 | t=request.POST['configvarDel'].strip() | 1683 | t=request.POST['configvarDel'].strip() |
1684 | pt = ProjectVariable.objects.get(pk = int(t)).delete() | 1684 | pt = ProjectVariable.objects.get(pk = int(t)).delete() |
1685 | 1685 | ||
1686 | # return all project settings, filter out blacklist and elsewhere-managed variables | 1686 | # return all project settings, filter out disallowed and elsewhere-managed variables |
1687 | vars_managed,vars_fstypes,vars_blacklist = get_project_configvars_context() | 1687 | vars_managed,vars_fstypes,vars_disallowed = get_project_configvars_context() |
1688 | configvars_query = ProjectVariable.objects.filter(project_id = pid).all() | 1688 | configvars_query = ProjectVariable.objects.filter(project_id = pid).all() |
1689 | for var in vars_managed: | 1689 | for var in vars_managed: |
1690 | configvars_query = configvars_query.exclude(name = var) | 1690 | configvars_query = configvars_query.exclude(name = var) |
1691 | for var in vars_blacklist: | 1691 | for var in vars_disallowed: |
1692 | configvars_query = configvars_query.exclude(name = var) | 1692 | configvars_query = configvars_query.exclude(name = var) |
1693 | 1693 | ||
1694 | return_data = { | 1694 | return_data = { |
@@ -1781,7 +1781,7 @@ if True: | |||
1781 | 'MACHINE', 'BBLAYERS' | 1781 | 'MACHINE', 'BBLAYERS' |
1782 | } | 1782 | } |
1783 | 1783 | ||
1784 | vars_blacklist = { | 1784 | vars_disallowed = { |
1785 | 'PARALLEL_MAKE','BB_NUMBER_THREADS', | 1785 | 'PARALLEL_MAKE','BB_NUMBER_THREADS', |
1786 | 'BB_DISKMON_DIRS','BB_NUMBER_THREADS','CVS_PROXY_HOST','CVS_PROXY_PORT', | 1786 | 'BB_DISKMON_DIRS','BB_NUMBER_THREADS','CVS_PROXY_HOST','CVS_PROXY_PORT', |
1787 | 'PARALLEL_MAKE','TMPDIR', | 1787 | 'PARALLEL_MAKE','TMPDIR', |
@@ -1790,7 +1790,7 @@ if True: | |||
1790 | 1790 | ||
1791 | vars_fstypes = Target_Image_File.SUFFIXES | 1791 | vars_fstypes = Target_Image_File.SUFFIXES |
1792 | 1792 | ||
1793 | return(vars_managed,sorted(vars_fstypes),vars_blacklist) | 1793 | return(vars_managed,sorted(vars_fstypes),vars_disallowed) |
1794 | 1794 | ||
1795 | def projectconf(request, pid): | 1795 | def projectconf(request, pid): |
1796 | 1796 | ||
@@ -1799,12 +1799,12 @@ if True: | |||
1799 | except Project.DoesNotExist: | 1799 | except Project.DoesNotExist: |
1800 | return HttpResponseNotFound("<h1>Project id " + pid + " is unavailable</h1>") | 1800 | return HttpResponseNotFound("<h1>Project id " + pid + " is unavailable</h1>") |
1801 | 1801 | ||
1802 | # remove blacklist and externally managed varaibles from this list | 1802 | # remove disallowed and externally managed varaibles from this list |
1803 | vars_managed,vars_fstypes,vars_blacklist = get_project_configvars_context() | 1803 | vars_managed,vars_fstypes,vars_disallowed = get_project_configvars_context() |
1804 | configvars = ProjectVariable.objects.filter(project_id = pid).all() | 1804 | configvars = ProjectVariable.objects.filter(project_id = pid).all() |
1805 | for var in vars_managed: | 1805 | for var in vars_managed: |
1806 | configvars = configvars.exclude(name = var) | 1806 | configvars = configvars.exclude(name = var) |
1807 | for var in vars_blacklist: | 1807 | for var in vars_disallowed: |
1808 | configvars = configvars.exclude(name = var) | 1808 | configvars = configvars.exclude(name = var) |
1809 | 1809 | ||
1810 | context = { | 1810 | context = { |
@@ -1812,7 +1812,7 @@ if True: | |||
1812 | 'configvars': configvars, | 1812 | 'configvars': configvars, |
1813 | 'vars_managed': vars_managed, | 1813 | 'vars_managed': vars_managed, |
1814 | 'vars_fstypes': vars_fstypes, | 1814 | 'vars_fstypes': vars_fstypes, |
1815 | 'vars_blacklist': vars_blacklist, | 1815 | 'vars_disallowed': vars_disallowed, |
1816 | } | 1816 | } |
1817 | 1817 | ||
1818 | try: | 1818 | try: |