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 | |
| 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')
| -rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 2 | ||||
| -rw-r--r-- | bitbake/lib/layerindexlib/__init__.py | 4 | ||||
| -rw-r--r-- | bitbake/lib/layerindexlib/cooker.py | 2 | ||||
| -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 |
6 files changed, 24 insertions, 24 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 35fae6623a..5dfe5ff360 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
| @@ -199,7 +199,7 @@ class URI(object): | |||
| 199 | file://hostname/absolute/path.diff (would be IETF compliant) | 199 | file://hostname/absolute/path.diff (would be IETF compliant) |
| 200 | 200 | ||
| 201 | Note that the last case only applies to a list of | 201 | Note that the last case only applies to a list of |
| 202 | "whitelisted" schemes (currently only file://), that requires | 202 | explicitly allowed schemes (currently only file://), that requires |
| 203 | its URIs to not have a network location. | 203 | its URIs to not have a network location. |
| 204 | """ | 204 | """ |
| 205 | 205 | ||
diff --git a/bitbake/lib/layerindexlib/__init__.py b/bitbake/lib/layerindexlib/__init__.py index 08063c571e..ac03d89876 100644 --- a/bitbake/lib/layerindexlib/__init__.py +++ b/bitbake/lib/layerindexlib/__init__.py | |||
| @@ -1278,7 +1278,7 @@ class Recipe(LayerIndexItemObj_LayerBranch): | |||
| 1278 | filename, filepath, pn, pv, layerbranch, | 1278 | filename, filepath, pn, pv, layerbranch, |
| 1279 | summary="", description="", section="", license="", | 1279 | summary="", description="", section="", license="", |
| 1280 | homepage="", bugtracker="", provides="", bbclassextend="", | 1280 | homepage="", bugtracker="", provides="", bbclassextend="", |
| 1281 | inherits="", blacklisted="", updated=None): | 1281 | inherits="", disallowed="", updated=None): |
| 1282 | self.id = id | 1282 | self.id = id |
| 1283 | self.filename = filename | 1283 | self.filename = filename |
| 1284 | self.filepath = filepath | 1284 | self.filepath = filepath |
| @@ -1294,7 +1294,7 @@ class Recipe(LayerIndexItemObj_LayerBranch): | |||
| 1294 | self.bbclassextend = bbclassextend | 1294 | self.bbclassextend = bbclassextend |
| 1295 | self.inherits = inherits | 1295 | self.inherits = inherits |
| 1296 | self.updated = updated or datetime.datetime.today().isoformat() | 1296 | self.updated = updated or datetime.datetime.today().isoformat() |
| 1297 | self.blacklisted = blacklisted | 1297 | self.disallowed = disallowed |
| 1298 | if isinstance(layerbranch, LayerBranch): | 1298 | if isinstance(layerbranch, LayerBranch): |
| 1299 | self.layerbranch = layerbranch | 1299 | self.layerbranch = layerbranch |
| 1300 | else: | 1300 | else: |
diff --git a/bitbake/lib/layerindexlib/cooker.py b/bitbake/lib/layerindexlib/cooker.py index 2de6e5faa0..ced3e06360 100644 --- a/bitbake/lib/layerindexlib/cooker.py +++ b/bitbake/lib/layerindexlib/cooker.py | |||
| @@ -279,7 +279,7 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin): | |||
| 279 | summary=pn, description=pn, section='?', | 279 | summary=pn, description=pn, section='?', |
| 280 | license='?', homepage='?', bugtracker='?', | 280 | license='?', homepage='?', bugtracker='?', |
| 281 | provides='?', bbclassextend='?', inherits='?', | 281 | provides='?', bbclassextend='?', inherits='?', |
| 282 | blacklisted='?', layerbranch=depBranchId) | 282 | disallowed='?', layerbranch=depBranchId) |
| 283 | 283 | ||
| 284 | index = addElement("recipes", [recipe], index) | 284 | index = addElement("recipes", [recipe], index) |
| 285 | 285 | ||
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: |
