[gnome-software] tree-wide: Replace usages of whitelist/blacklist



commit d2b13378b1f912526272981a07a1cea8c6a5af21
Author: Matthew Leeds <matthew leeds endlessm com>
Date:   Tue Jun 9 14:47:31 2020 -0700

    tree-wide: Replace usages of whitelist/blacklist
    
    This commit replaces usages of the terms whitelist and blacklist with
    allowlist and blocklist, which are both more inclusive and more precise.
    This terminology change has been implemented across many projects.[1][2]
    
    There is one place we can't remove the term blacklist because it is
    there for backwards compatibility, in plugins/core/gs-appstream.c
    
    This commit causes three types of API breaks and therefore should not be
    backported to stable branches.
    1) The plugin-whitelist and plugin-blacklist CLI parameters have been
       renamed. These do not show up in Debian Code Search anywhere.
    2) The environment variables GNOME_SOFTWARE_PLUGINS_WHITELIST and
       GNOME_SOFTWARE_PLUGINS_BLACKLIST have been renamed. These are for
       debugging and also don't show up in Debian Code Search.
    3) The hardcoded-blacklist plugin has been renamed which means the
       associated file is now libgs_plugin_hardcoded-blocklist.so which may
       require distributions to change their packaging.
    
    [1] https://go-review.googlesource.com/c/go/+/236857/
    [2] https://9to5google.com/2020/06/07/google-chrome-blacklist-blocklist-more-inclusive/

 contrib/gnome-software.spec.in                     |  2 +-
 doc/kudos.md                                       |  2 +-
 lib/gs-app.h                                       |  2 +-
 lib/gs-cmd.c                                       | 24 ++++++++++----------
 lib/gs-plugin-loader.c                             | 26 +++++++++++-----------
 lib/gs-plugin-loader.h                             |  4 ++--
 ...blacklist.c => gs-plugin-hardcoded-blocklist.c} |  2 +-
 plugins/core/gs-self-test.c                        |  4 ++--
 plugins/core/meson.build                           |  4 ++--
 plugins/dpkg/gs-self-test.c                        |  4 ++--
 plugins/dummy/gs-self-test.c                       |  6 ++---
 plugins/fedora-langpacks/gs-self-test.c            |  4 ++--
 plugins/flatpak/gs-self-test.c                     |  4 ++--
 plugins/fwupd/gs-self-test.c                       |  4 ++--
 plugins/malcontent/gs-plugin-malcontent.c          | 10 ++++-----
 plugins/modalias/gs-self-test.c                    |  4 ++--
 plugins/packagekit/gs-self-test.c                  |  4 ++--
 plugins/repos/gs-self-test.c                       |  4 ++--
 plugins/snap/gs-self-test.c                        |  4 ++--
 src/gs-application.c                               | 16 ++++++-------
 20 files changed, 67 insertions(+), 67 deletions(-)
---
diff --git a/contrib/gnome-software.spec.in b/contrib/gnome-software.spec.in
index 587a72e6..73ff7669 100644
--- a/contrib/gnome-software.spec.in
+++ b/contrib/gnome-software.spec.in
@@ -161,7 +161,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
 %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_flatpak.so
 %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_fwupd.so
 %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_generic-updates.so
-%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_hardcoded-blacklist.so
+%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_hardcoded-blocklist.so
 %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_hardcoded-popular.so
 %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_icons.so
 %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_key-colors-metadata.so
diff --git a/doc/kudos.md b/doc/kudos.md
index f9fd32e7..68a1d52a 100644
--- a/doc/kudos.md
+++ b/doc/kudos.md
@@ -62,7 +62,7 @@ To do this, just add something like:
 
 Although, please bear in mind any application that is found cheating, i.e.
 adding kudos artificially will have **all** the kudos manually removed
-with a blacklist rule in the AppStream builder.
+with a blocklist rule in the AppStream builder.
 
 If you are a vendor, or a system distributor and just want to increase the
 number of kudos for your pet proprietary application that's essential to
diff --git a/lib/gs-app.h b/lib/gs-app.h
index 6b9e72e7..1e43f73f 100644
--- a/lib/gs-app.h
+++ b/lib/gs-app.h
@@ -84,7 +84,7 @@ typedef enum {
  * @GS_APP_QUIRK_NEW_PERMISSIONS:      The update requires new permissions
  * @GS_APP_QUIRK_PARENTAL_NOT_LAUNCHABLE:      The app cannot be run by the current user due to parental 
controls, and should not be launchable
  * @GS_APP_QUIRK_HIDE_FROM_SEARCH:     The app should not be shown in search results
- * @GS_APP_QUIRK_HIDE_EVERYWHERE:      The app should not be shown anywhere (it’s blacklisted)
+ * @GS_APP_QUIRK_HIDE_EVERYWHERE:      The app should not be shown anywhere (it’s blocklisted)
  * @GS_APP_QUIRK_DO_NOT_AUTO_UPDATE:   The app should not be automatically updated
  *
  * The application attributes.
diff --git a/lib/gs-cmd.c b/lib/gs-cmd.c
index 6b12f2e0..1cd5aa5f 100644
--- a/lib/gs-cmd.c
+++ b/lib/gs-cmd.c
@@ -288,14 +288,14 @@ main (int argc, char **argv)
        gint i;
        guint cache_age = 0;
        gint repeat = 1;
-       g_auto(GStrv) plugin_blacklist = NULL;
-       g_auto(GStrv) plugin_whitelist = NULL;
+       g_auto(GStrv) plugin_blocklist = NULL;
+       g_auto(GStrv) plugin_allowlist = NULL;
        g_autoptr(GError) error = NULL;
        g_autoptr(GsAppList) list = NULL;
        g_autoptr(GPtrArray) categories = NULL;
        g_autoptr(GsDebug) debug = gs_debug_new ();
-       g_autofree gchar *plugin_blacklist_str = NULL;
-       g_autofree gchar *plugin_whitelist_str = NULL;
+       g_autofree gchar *plugin_blocklist_str = NULL;
+       g_autofree gchar *plugin_allowlist_str = NULL;
        g_autofree gchar *refine_flags_str = NULL;
        g_autoptr(GsApp) app = NULL;
        g_autoptr(GFile) file = NULL;
@@ -313,9 +313,9 @@ main (int argc, char **argv)
                  "Return a maximum number of results", NULL },
                { "prefer-local", '\0', 0, G_OPTION_ARG_NONE, &prefer_local,
                  "Prefer local file sources to AppStream", NULL },
-               { "plugin-blacklist", '\0', 0, G_OPTION_ARG_STRING, &plugin_blacklist_str,
+               { "plugin-blocklist", '\0', 0, G_OPTION_ARG_STRING, &plugin_blocklist_str,
                  "Do not load specific plugins", NULL },
-               { "plugin-whitelist", '\0', 0, G_OPTION_ARG_STRING, &plugin_whitelist_str,
+               { "plugin-allowlist", '\0', 0, G_OPTION_ARG_STRING, &plugin_allowlist_str,
                  "Only load specific plugins", NULL },
                { "verbose", '\0', 0, G_OPTION_ARG_NONE, &verbose,
                  "Show verbose debugging information", NULL },
@@ -358,13 +358,13 @@ main (int argc, char **argv)
        self->plugin_loader = gs_plugin_loader_new ();
        if (g_file_test (LOCALPLUGINDIR, G_FILE_TEST_EXISTS))
                gs_plugin_loader_add_location (self->plugin_loader, LOCALPLUGINDIR);
-       if (plugin_whitelist_str != NULL)
-               plugin_whitelist = g_strsplit (plugin_whitelist_str, ",", -1);
-       if (plugin_blacklist_str != NULL)
-               plugin_blacklist = g_strsplit (plugin_blacklist_str, ",", -1);
+       if (plugin_allowlist_str != NULL)
+               plugin_allowlist = g_strsplit (plugin_allowlist_str, ",", -1);
+       if (plugin_blocklist_str != NULL)
+               plugin_blocklist = g_strsplit (plugin_blocklist_str, ",", -1);
        ret = gs_plugin_loader_setup (self->plugin_loader,
-                                     plugin_whitelist,
-                                     plugin_blacklist,
+                                     plugin_allowlist,
+                                     plugin_blocklist,
                                      NULL,
                                      &error);
        if (!ret) {
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 979f3d5d..b4e52086 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -1198,9 +1198,9 @@ gs_plugin_loader_app_is_valid (GsApp *app, gpointer user_data)
                return FALSE;
        }
 
-       /* don't show blacklisted apps */
+       /* don't show blocklisted apps */
        if (gs_app_has_quirk (app, GS_APP_QUIRK_HIDE_EVERYWHERE)) {
-               g_debug ("app invalid as blacklisted %s",
+               g_debug ("app invalid as blocklisted %s",
                         gs_plugin_loader_get_app_str (app));
                return FALSE;
        }
@@ -2284,8 +2284,8 @@ gs_plugin_loader_find_plugins (const gchar *path, GError **error)
 /**
  * gs_plugin_loader_setup:
  * @plugin_loader: a #GsPluginLoader
- * @whitelist: list of plugin names, or %NULL
- * @blacklist: list of plugin names, or %NULL
+ * @allowlist: list of plugin names, or %NULL
+ * @blocklist: list of plugin names, or %NULL
  * @cancellable: A #GCancellable, or %NULL
  * @error: A #GError, or %NULL
  *
@@ -2295,8 +2295,8 @@ gs_plugin_loader_find_plugins (const gchar *path, GError **error)
  */
 gboolean
 gs_plugin_loader_setup (GsPluginLoader *plugin_loader,
-                       gchar **whitelist,
-                       gchar **blacklist,
+                       gchar **allowlist,
+                       gchar **blocklist,
                        GCancellable *cancellable,
                        GError **error)
 {
@@ -2350,31 +2350,31 @@ gs_plugin_loader_setup (GsPluginLoader *plugin_loader,
                }
        }
 
-       /* optional whitelist */
-       if (whitelist != NULL) {
+       /* optional allowlist */
+       if (allowlist != NULL) {
                for (i = 0; i < priv->plugins->len; i++) {
                        gboolean ret;
                        plugin = g_ptr_array_index (priv->plugins, i);
                        if (!gs_plugin_get_enabled (plugin))
                                continue;
-                       ret = g_strv_contains ((const gchar * const *) whitelist,
+                       ret = g_strv_contains ((const gchar * const *) allowlist,
                                               gs_plugin_get_name (plugin));
                        if (!ret) {
-                               g_debug ("%s not in whitelist, disabling",
+                               g_debug ("%s not in allowlist, disabling",
                                         gs_plugin_get_name (plugin));
                        }
                        gs_plugin_set_enabled (plugin, ret);
                }
        }
 
-       /* optional blacklist */
-       if (blacklist != NULL) {
+       /* optional blocklist */
+       if (blocklist != NULL) {
                for (i = 0; i < priv->plugins->len; i++) {
                        gboolean ret;
                        plugin = g_ptr_array_index (priv->plugins, i);
                        if (!gs_plugin_get_enabled (plugin))
                                continue;
-                       ret = g_strv_contains ((const gchar * const *) blacklist,
+                       ret = g_strv_contains ((const gchar * const *) blocklist,
                                               gs_plugin_get_name (plugin));
                        if (ret)
                                gs_plugin_set_enabled (plugin, FALSE);
diff --git a/lib/gs-plugin-loader.h b/lib/gs-plugin-loader.h
index 74cbfa53..51e27f9b 100644
--- a/lib/gs-plugin-loader.h
+++ b/lib/gs-plugin-loader.h
@@ -54,8 +54,8 @@ GPtrArray     *gs_plugin_loader_job_get_categories_finish (GsPluginLoader *plugin_lo
                                                         GAsyncResult   *res,
                                                         GError         **error);
 gboolean        gs_plugin_loader_setup                 (GsPluginLoader *plugin_loader,
-                                                        gchar          **whitelist,
-                                                        gchar          **blacklist,
+                                                        gchar          **allowlist,
+                                                        gchar          **blocklist,
                                                         GCancellable   *cancellable,
                                                         GError         **error);
 void            gs_plugin_loader_dump_state            (GsPluginLoader *plugin_loader);
diff --git a/plugins/core/gs-plugin-hardcoded-blacklist.c b/plugins/core/gs-plugin-hardcoded-blocklist.c
similarity index 96%
rename from plugins/core/gs-plugin-hardcoded-blacklist.c
rename to plugins/core/gs-plugin-hardcoded-blocklist.c
index 48d02187..a022ad53 100644
--- a/plugins/core/gs-plugin-hardcoded-blacklist.c
+++ b/plugins/core/gs-plugin-hardcoded-blocklist.c
@@ -12,7 +12,7 @@
 
 /*
  * SECTION:
- * Blacklists some applications based on a hardcoded list.
+ * Blocklists some applications based on a hardcoded list.
  */
 
 void
diff --git a/plugins/core/gs-self-test.c b/plugins/core/gs-self-test.c
index cc7cf5cb..f36145db 100644
--- a/plugins/core/gs-self-test.c
+++ b/plugins/core/gs-self-test.c
@@ -185,7 +185,7 @@ main (int argc, char **argv)
        g_autoptr(GError) error = NULL;
        g_autoptr(GsPluginLoader) plugin_loader = NULL;
        const gchar *xml;
-       const gchar *whitelist[] = {
+       const gchar *allowlist[] = {
                "appstream",
                "generic-updates",
                "icons",
@@ -250,7 +250,7 @@ main (int argc, char **argv)
        plugin_loader = gs_plugin_loader_new ();
        gs_plugin_loader_add_location (plugin_loader, LOCALPLUGINDIR);
        ret = gs_plugin_loader_setup (plugin_loader,
-                                     (gchar**) whitelist,
+                                     (gchar**) allowlist,
                                      NULL,
                                      NULL,
                                      &error);
diff --git a/plugins/core/meson.build b/plugins/core/meson.build
index 39630d13..10c43f32 100644
--- a/plugins/core/meson.build
+++ b/plugins/core/meson.build
@@ -158,8 +158,8 @@ shared_module(
 )
 
 shared_module(
-  'gs_plugin_hardcoded-blacklist',
-  sources : 'gs-plugin-hardcoded-blacklist.c',
+  'gs_plugin_hardcoded-blocklist',
+  sources : 'gs-plugin-hardcoded-blocklist.c',
   include_directories : [
     include_directories('../..'),
     include_directories('../../lib'),
diff --git a/plugins/dpkg/gs-self-test.c b/plugins/dpkg/gs-self-test.c
index 38d561e5..71687ea0 100644
--- a/plugins/dpkg/gs-self-test.c
+++ b/plugins/dpkg/gs-self-test.c
@@ -54,7 +54,7 @@ main (int argc, char **argv)
        gboolean ret;
        g_autoptr(GError) error = NULL;
        g_autoptr(GsPluginLoader) plugin_loader = NULL;
-       const gchar *whitelist[] = {
+       const gchar *allowlist[] = {
                "dpkg",
                NULL
        };
@@ -80,7 +80,7 @@ main (int argc, char **argv)
        plugin_loader = gs_plugin_loader_new ();
        gs_plugin_loader_add_location (plugin_loader, LOCALPLUGINDIR);
        ret = gs_plugin_loader_setup (plugin_loader,
-                                     (gchar**) whitelist,
+                                     (gchar**) allowlist,
                                      NULL,
                                      NULL,
                                      &error);
diff --git a/plugins/dummy/gs-self-test.c b/plugins/dummy/gs-self-test.c
index 69b74591..b1280c99 100644
--- a/plugins/dummy/gs-self-test.c
+++ b/plugins/dummy/gs-self-test.c
@@ -718,11 +718,11 @@ main (int argc, char **argv)
        g_autofree gchar *xml = NULL;
        g_autoptr(GError) error = NULL;
        g_autoptr(GsPluginLoader) plugin_loader = NULL;
-       const gchar *whitelist[] = {
+       const gchar *allowlist[] = {
                "appstream",
                "dummy",
                "generic-updates",
-               "hardcoded-blacklist",
+               "hardcoded-blocklist",
                "desktop-categories",
                "desktop-menu-path",
                "icons",
@@ -829,7 +829,7 @@ main (int argc, char **argv)
        gs_plugin_loader_add_location (plugin_loader, LOCALPLUGINDIR);
        gs_plugin_loader_add_location (plugin_loader, LOCALPLUGINDIR_CORE);
        ret = gs_plugin_loader_setup (plugin_loader,
-                                     (gchar**) whitelist,
+                                     (gchar**) allowlist,
                                      NULL,
                                      NULL,
                                      &error);
diff --git a/plugins/fedora-langpacks/gs-self-test.c b/plugins/fedora-langpacks/gs-self-test.c
index 2184041a..9c452525 100644
--- a/plugins/fedora-langpacks/gs-self-test.c
+++ b/plugins/fedora-langpacks/gs-self-test.c
@@ -53,7 +53,7 @@ main (int argc, char **argv)
        gboolean ret;
        g_autoptr(GError) error = NULL;
        g_autoptr(GsPluginLoader) plugin_loader = NULL;
-       const gchar *whitelist[] = {
+       const gchar *allowlist[] = {
                "fedora-langpacks",
                NULL
        };
@@ -72,7 +72,7 @@ main (int argc, char **argv)
        plugin_loader = gs_plugin_loader_new ();
        gs_plugin_loader_add_location (plugin_loader, LOCALPLUGINDIR);
        ret = gs_plugin_loader_setup (plugin_loader,
-                                     (gchar**) whitelist,
+                                     (gchar**) allowlist,
                                      NULL,
                                      NULL,
                                      &error);
diff --git a/plugins/flatpak/gs-self-test.c b/plugins/flatpak/gs-self-test.c
index 4545827b..7d792dcb 100644
--- a/plugins/flatpak/gs-self-test.c
+++ b/plugins/flatpak/gs-self-test.c
@@ -1740,7 +1740,7 @@ main (int argc, char **argv)
        g_autofree gchar *xml = NULL;
        g_autoptr(GError) error = NULL;
        g_autoptr(GsPluginLoader) plugin_loader = NULL;
-       const gchar *whitelist[] = {
+       const gchar *allowlist[] = {
                "appstream",
                "flatpak",
                "icons",
@@ -1796,7 +1796,7 @@ main (int argc, char **argv)
        gs_plugin_loader_add_location (plugin_loader, LOCALPLUGINDIR);
        gs_plugin_loader_add_location (plugin_loader, LOCALPLUGINDIR_CORE);
        ret = gs_plugin_loader_setup (plugin_loader,
-                                     (gchar**) whitelist,
+                                     (gchar**) allowlist,
                                      NULL,
                                      NULL,
                                      &error);
diff --git a/plugins/fwupd/gs-self-test.c b/plugins/fwupd/gs-self-test.c
index 5078a30a..a0aad5e4 100644
--- a/plugins/fwupd/gs-self-test.c
+++ b/plugins/fwupd/gs-self-test.c
@@ -62,7 +62,7 @@ main (int argc, char **argv)
        gboolean ret;
        g_autoptr(GError) error = NULL;
        g_autoptr(GsPluginLoader) plugin_loader = NULL;
-       const gchar *whitelist[] = {
+       const gchar *allowlist[] = {
                "fwupd",
                NULL
        };
@@ -88,7 +88,7 @@ main (int argc, char **argv)
        plugin_loader = gs_plugin_loader_new ();
        gs_plugin_loader_add_location (plugin_loader, LOCALPLUGINDIR);
        ret = gs_plugin_loader_setup (plugin_loader,
-                                     (gchar**) whitelist,
+                                     (gchar**) allowlist,
                                      NULL,
                                      NULL,
                                      &error);
diff --git a/plugins/malcontent/gs-plugin-malcontent.c b/plugins/malcontent/gs-plugin-malcontent.c
index 95df1264..4ba1e63d 100644
--- a/plugins/malcontent/gs-plugin-malcontent.c
+++ b/plugins/malcontent/gs-plugin-malcontent.c
@@ -22,7 +22,7 @@
  * Specifically, %GS_APP_QUIRK_PARENTAL_FILTER will be added if an app’s OARS
  * rating is too extreme for the current parental controls OARS policy.
  * %GS_APP_QUIRK_PARENTAL_NOT_LAUNCHABLE will be added if the app is listed on
- * the current parental controls blacklist.
+ * the current parental controls blocklist.
  *
  * Parental controls policy is loaded using libmalcontent.
  *
@@ -138,7 +138,7 @@ app_is_content_rating_appropriate (GsApp *app, MctAppFilter *app_filter)
 }
 
 static gboolean
-app_is_parentally_blacklisted (GsApp *app, MctAppFilter *app_filter)
+app_is_parentally_blocklisted (GsApp *app, MctAppFilter *app_filter)
 {
        const gchar *desktop_id;
        g_autoptr(GAppInfo) appinfo = NULL;
@@ -170,9 +170,9 @@ app_set_parental_quirks (GsPlugin *plugin, GsApp *app, MctAppFilter *app_filter)
                gs_app_remove_quirk (app, GS_APP_QUIRK_PARENTAL_FILTER);
        }
 
-       /* check the app blacklist to see if this app should be launchable */
-       if (app_is_parentally_blacklisted (app, app_filter)) {
-               g_debug ("Filtering ‘%s’: app is blacklisted for this user",
+       /* check the app blocklist to see if this app should be launchable */
+       if (app_is_parentally_blocklisted (app, app_filter)) {
+               g_debug ("Filtering ‘%s’: app is blocklisted for this user",
                         gs_app_get_unique_id (app));
                gs_app_add_quirk (app, GS_APP_QUIRK_PARENTAL_NOT_LAUNCHABLE);
                filtered = TRUE;
diff --git a/plugins/modalias/gs-self-test.c b/plugins/modalias/gs-self-test.c
index 23a58fda..86855d20 100644
--- a/plugins/modalias/gs-self-test.c
+++ b/plugins/modalias/gs-self-test.c
@@ -47,7 +47,7 @@ main (int argc, char **argv)
        g_autofree gchar *xml = NULL;
        g_autoptr(GError) error = NULL;
        g_autoptr(GsPluginLoader) plugin_loader = NULL;
-       const gchar *whitelist[] = {
+       const gchar *allowlist[] = {
                "appstream",
                "dummy",
                "modalias",
@@ -94,7 +94,7 @@ main (int argc, char **argv)
        gs_plugin_loader_add_location (plugin_loader, LOCALPLUGINDIR_CORE);
        gs_plugin_loader_add_location (plugin_loader, LOCALPLUGINDIR_DUMMY);
        ret = gs_plugin_loader_setup (plugin_loader,
-                                     (gchar**) whitelist,
+                                     (gchar**) allowlist,
                                      NULL,
                                      NULL,
                                      &error);
diff --git a/plugins/packagekit/gs-self-test.c b/plugins/packagekit/gs-self-test.c
index b3b7cfc8..ad22b0ff 100644
--- a/plugins/packagekit/gs-self-test.c
+++ b/plugins/packagekit/gs-self-test.c
@@ -238,7 +238,7 @@ main (int argc, char **argv)
        gboolean ret;
        g_autoptr(GError) error = NULL;
        g_autoptr(GsPluginLoader) plugin_loader = NULL;
-       const gchar *whitelist[] = {
+       const gchar *allowlist[] = {
                "packagekit-local",
                NULL
        };
@@ -260,7 +260,7 @@ main (int argc, char **argv)
        plugin_loader = gs_plugin_loader_new ();
        gs_plugin_loader_add_location (plugin_loader, LOCALPLUGINDIR);
        ret = gs_plugin_loader_setup (plugin_loader,
-                                     (gchar**) whitelist,
+                                     (gchar**) allowlist,
                                      NULL,
                                      NULL,
                                      &error);
diff --git a/plugins/repos/gs-self-test.c b/plugins/repos/gs-self-test.c
index d4778601..46705512 100644
--- a/plugins/repos/gs-self-test.c
+++ b/plugins/repos/gs-self-test.c
@@ -41,7 +41,7 @@ main (int argc, char **argv)
        g_autofree gchar *reposdir = NULL;
        g_autoptr(GError) error = NULL;
        g_autoptr(GsPluginLoader) plugin_loader = NULL;
-       const gchar *whitelist[] = {
+       const gchar *allowlist[] = {
                "repos",
                NULL
        };
@@ -65,7 +65,7 @@ main (int argc, char **argv)
        plugin_loader = gs_plugin_loader_new ();
        gs_plugin_loader_add_location (plugin_loader, LOCALPLUGINDIR);
        ret = gs_plugin_loader_setup (plugin_loader,
-                                     (gchar**) whitelist,
+                                     (gchar**) allowlist,
                                      NULL,
                                      NULL,
                                      &error);
diff --git a/plugins/snap/gs-self-test.c b/plugins/snap/gs-self-test.c
index 99180455..a02d94d9 100644
--- a/plugins/snap/gs-self-test.c
+++ b/plugins/snap/gs-self-test.c
@@ -338,7 +338,7 @@ main (int argc, char **argv)
        gboolean ret;
        g_autoptr(GError) error = NULL;
        g_autoptr(GsPluginLoader) plugin_loader = NULL;
-       const gchar *whitelist[] = {
+       const gchar *allowlist[] = {
                "snap",
                NULL
        };
@@ -358,7 +358,7 @@ main (int argc, char **argv)
        gs_plugin_loader_add_location (plugin_loader, LOCALPLUGINDIR);
        gs_plugin_loader_add_location (plugin_loader, LOCALPLUGINDIR_CORE);
        ret = gs_plugin_loader_setup (plugin_loader,
-                                     (gchar**) whitelist,
+                                     (gchar**) allowlist,
                                      NULL,
                                      NULL,
                                      &error);
diff --git a/src/gs-application.c b/src/gs-application.c
index 59a9f432..e7375d85 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -142,8 +142,8 @@ static void
 gs_application_initialize_plugins (GsApplication *app)
 {
        static gboolean initialized = FALSE;
-       g_auto(GStrv) plugin_blacklist = NULL;
-       g_auto(GStrv) plugin_whitelist = NULL;
+       g_auto(GStrv) plugin_blocklist = NULL;
+       g_auto(GStrv) plugin_allowlist = NULL;
        g_autoptr(GError) error = NULL;
        const gchar *tmp;
 
@@ -153,19 +153,19 @@ gs_application_initialize_plugins (GsApplication *app)
        initialized = TRUE;
 
        /* allow for debugging */
-       tmp = g_getenv ("GNOME_SOFTWARE_PLUGINS_BLACKLIST");
+       tmp = g_getenv ("GNOME_SOFTWARE_PLUGINS_BLOCKLIST");
        if (tmp != NULL)
-               plugin_blacklist = g_strsplit (tmp, ",", -1);
-       tmp = g_getenv ("GNOME_SOFTWARE_PLUGINS_WHITELIST");
+               plugin_blocklist = g_strsplit (tmp, ",", -1);
+       tmp = g_getenv ("GNOME_SOFTWARE_PLUGINS_ALLOWLIST");
        if (tmp != NULL)
-               plugin_whitelist = g_strsplit (tmp, ",", -1);
+               plugin_allowlist = g_strsplit (tmp, ",", -1);
 
        app->plugin_loader = gs_plugin_loader_new ();
        if (g_file_test (LOCALPLUGINDIR, G_FILE_TEST_EXISTS))
                gs_plugin_loader_add_location (app->plugin_loader, LOCALPLUGINDIR);
        if (!gs_plugin_loader_setup (app->plugin_loader,
-                                    plugin_whitelist,
-                                    plugin_blacklist,
+                                    plugin_allowlist,
+                                    plugin_blocklist,
                                     NULL,
                                     &error)) {
                g_warning ("Failed to setup plugins: %s", error->message);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]