[tracker-miners/sam/blocklist: 34/34] Use 'blocklist' instead of 'blacklist'



commit b8f1369d881e9a5fc553b2f2b1420a85c3736d57
Author: Sam Thursfield <sam afuera me uk>
Date:   Wed Jun 17 11:42:18 2020 +0200

    Use 'blocklist' instead of 'blacklist'
    
    The word 'blacklist' comes from the medieval term 'black book'. However,
    since 'black' is now used to describe people we should avoid additional
    negative associations with it. Use 'blocklist'.
    
    See also: 
https://www.zdnet.com/article/github-to-replace-master-with-alternative-term-to-avoid-slavery-references/

 ...org.freedesktop.Tracker.Miner.Files.gschema.xml |  2 +-
 src/libtracker-miner/tracker-decorator.c           | 30 +++++++++++-----------
 src/tracker-extract/tracker-extract-gstreamer.c    |  6 ++---
 3 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/data/org.freedesktop.Tracker.Miner.Files.gschema.xml 
b/data/org.freedesktop.Tracker.Miner.Files.gschema.xml
index 3e5b6c149..57b06b838 100644
--- a/data/org.freedesktop.Tracker.Miner.Files.gschema.xml
+++ b/data/org.freedesktop.Tracker.Miner.Files.gschema.xml
@@ -142,7 +142,7 @@ Boston, MA  02110-1301, USA.
 
     <key name="ignored-directories-with-content" type="as">
       <summary>Ignored directories with content</summary>
-      <description>Avoid any directory containing a file blacklisted here</description>
+      <description>Avoid any directory containing a file blocklisted here</description>
       <default>[ '.trackerignore', '.git', '.hg', '.nomedia' ]</default>
     </key>
   </schema>
diff --git a/src/libtracker-miner/tracker-decorator.c b/src/libtracker-miner/tracker-decorator.c
index 0b218f80f..8a1674722 100644
--- a/src/libtracker-miner/tracker-decorator.c
+++ b/src/libtracker-miner/tracker-decorator.c
@@ -79,7 +79,7 @@ struct _TrackerDecoratorPrivate {
 
        /* Arrays of tracker IDs */
        GArray *prepended_ids;
-       GSequence *blacklist_items;
+       GSequence *blocklist_items;
 
        GHashTable *tasks; /* Associative array of GTasks */
        GArray *sparql_buffer; /* Array of SparqlUpdate */
@@ -220,13 +220,13 @@ sequence_compare_func (gconstpointer data1,
 }
 
 static void
-decorator_blacklist_add (TrackerDecorator *decorator,
+decorator_blocklist_add (TrackerDecorator *decorator,
                          gint              id)
 {
        TrackerDecoratorPrivate *priv = decorator->priv;
        GSequenceIter *iter;
 
-       iter = g_sequence_search (priv->blacklist_items,
+       iter = g_sequence_search (priv->blocklist_items,
                                  GINT_TO_POINTER (id),
                                  sequence_compare_func,
                                  NULL);
@@ -237,13 +237,13 @@ decorator_blacklist_add (TrackerDecorator *decorator,
 }
 
 static void
-decorator_blacklist_remove (TrackerDecorator *decorator,
+decorator_blocklist_remove (TrackerDecorator *decorator,
                             gint              id)
 {
        TrackerDecoratorPrivate *priv = decorator->priv;
        GSequenceIter *iter;
 
-       iter = g_sequence_lookup (priv->blacklist_items,
+       iter = g_sequence_lookup (priv->blocklist_items,
                                  GINT_TO_POINTER (id),
                                  sequence_compare_func,
                                  NULL);
@@ -358,7 +358,7 @@ decorator_commit_cb (GObject      *object,
                        SparqlUpdate *update;
 
                        update = &g_array_index (priv->commit_buffer, SparqlUpdate, i);
-                       decorator_blacklist_add (decorator, update->id);
+                       decorator_blocklist_add (decorator, update->id);
                        item_warn (conn, update->id, update->sparql, error);
                }
        }
@@ -527,8 +527,8 @@ decorator_task_done (GObject      *object,
        sparql = g_task_propagate_pointer (G_TASK (result), &error);
 
        if (!sparql) {
-               /* Blacklist item */
-               decorator_blacklist_add (decorator, info->id);
+               /* Blocklist item */
+               decorator_blocklist_add (decorator, info->id);
 
                if (error) {
                        g_warning ("Task for '%s' finished with error: %s\n",
@@ -948,7 +948,7 @@ notifier_events_cb (TrackerDecorator *decorator,
                        break;
                case TRACKER_NOTIFIER_EVENT_DELETE:
                        decorator_item_cache_remove (decorator, id);
-                       decorator_blacklist_remove (decorator, id);
+                       decorator_blocklist_remove (decorator, id);
                        break;
                }
        }
@@ -1023,7 +1023,7 @@ tracker_decorator_finalize (GObject *object)
        g_array_unref (priv->prepended_ids);
        g_clear_pointer (&priv->sparql_buffer, g_array_unref);
        g_clear_pointer (&priv->commit_buffer, g_array_unref);
-       g_sequence_free (priv->blacklist_items);
+       g_sequence_free (priv->blocklist_items);
        g_timer_destroy (priv->timer);
 
        G_OBJECT_CLASS (tracker_decorator_parent_class)->finalize (object);
@@ -1162,7 +1162,7 @@ tracker_decorator_init (TrackerDecorator *decorator)
        decorator->priv = priv = tracker_decorator_get_instance_private (decorator);
        priv->classes = g_array_new (FALSE, FALSE, sizeof (ClassInfo));
        g_array_set_clear_func (priv->classes, (GDestroyNotify) class_info_clear);
-       priv->blacklist_items = g_sequence_new (NULL);
+       priv->blocklist_items = g_sequence_new (NULL);
        priv->prepended_ids = g_array_new (FALSE, FALSE, sizeof (gint));
        priv->batch_size = DEFAULT_BATCH_SIZE;
        priv->timer = g_timer_new ();
@@ -1244,8 +1244,8 @@ tracker_decorator_prepend_id (TrackerDecorator *decorator,
        priv = decorator->priv;
        g_array_append_val (priv->prepended_ids, id);
 
-       /* The resource was explicitly requested, remove it from blacklists */
-       decorator_blacklist_remove (decorator, id);
+       /* The resource was explicitly requested, remove it from blocklists */
+       decorator_blocklist_remove (decorator, id);
 }
 
 /**
@@ -1277,8 +1277,8 @@ tracker_decorator_delete_id (TrackerDecorator *decorator,
                }
        }
 
-       /* Blacklist the item so it's not processed in the future */
-       decorator_blacklist_add (decorator, id);
+       /* Blocklist the item so it's not processed in the future */
+       decorator_blocklist_add (decorator, id);
 }
 
 /**
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 007940469..af2153c44 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -1371,7 +1371,7 @@ G_MODULE_EXPORT gboolean
 tracker_extract_module_init (GError **error)
 {
        /* Lifted from totem-video-thumbnailer */
-       const gchar *blacklisted[] = {
+       const gchar *blocklisted[] = {
                "bcmdec",
                "vaapi",
                "video4linux2"
@@ -1382,10 +1382,10 @@ tracker_extract_module_init (GError **error)
        gst_init (NULL, NULL);
        registry = gst_registry_get ();
 
-       for (i = 0; i < G_N_ELEMENTS (blacklisted); i++) {
+       for (i = 0; i < G_N_ELEMENTS (blocklisted); i++) {
                GstPlugin *plugin =
                        gst_registry_find_plugin (registry,
-                                                 blacklisted[i]);
+                                                 blocklisted[i]);
                if (plugin)
                        gst_registry_remove_plugin (registry, plugin);
        }


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