[tracker/wip/carlosg/domain-ontologies: 103/124] libtracker-control: Remove obscure environment variables
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/domain-ontologies: 103/124] libtracker-control: Remove obscure environment variables
- Date: Thu, 29 Jun 2017 18:47:47 +0000 (UTC)
commit 506e464fa4bacd2468f3396a1365ad239c6c8140
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jun 20 17:26:28 2017 +0200
libtracker-control: Remove obscure environment variables
These were supposedly added for testing, but they are not used
anywhere, nor it sounds ok to fundamentally change TrackerMinerManager
behavior. Let's remove these.
docs/manpages/tracker-daemon.1 | 16 -------
src/libtracker-control/tracker-miner-manager.c | 54 +-----------------------
2 files changed, 1 insertions(+), 69 deletions(-)
---
diff --git a/docs/manpages/tracker-daemon.1 b/docs/manpages/tracker-daemon.1
index 794fbc1..66432f2 100644
--- a/docs/manpages/tracker-daemon.1
+++ b/docs/manpages/tracker-daemon.1
@@ -235,21 +235,5 @@ The \fIcookie\fR is given by a successful \fB\-\-pause\fR command. It
is a number which identifies each pause request. When all pauses have
been resumed, the miner will resume working.
-.SH ENVIRONMENT
-.TP
-.B TRACKER_MINERS_DIR
-Miners that are installed should have a .desktop file in
-/usr/share/tracker/miners/, this is how tracker-control knows about
-miners which exist but may not have not been started. This environment
-variable allows the location that miner .desktop files are loaded from
-to be overridden by setting it to a new path.
-.TP
-.B TRACKER_MINERS_DIR_DISABLED
-If you don't have .desktop files for miners, you can use this
-environment variable to get status information from \fBRUNNING\fR
-processes. This doesn't give any indication for miners \fBNOT\fR
-running. This uses registered miners on DBus to know about existing
-Tracker based data miners.
-
.SH SEE ALSO
.BR tracker-store (1).
diff --git a/src/libtracker-control/tracker-miner-manager.c b/src/libtracker-control/tracker-miner-manager.c
index fa4bc0e..c3d712c 100644
--- a/src/libtracker-control/tracker-miner-manager.c
+++ b/src/libtracker-control/tracker-miner-manager.c
@@ -682,41 +682,6 @@ tracker_miner_manager_get_running (TrackerMinerManager *manager)
}
static void
-load_running_miners_only (TrackerMinerManager *manager)
-{
- TrackerMinerManagerPrivate *priv;
- GSList *running, *l;
- gint prefix_len;
-
- priv = TRACKER_MINER_MANAGER_GET_PRIVATE (manager);
-
- running = tracker_miner_manager_get_running (manager);
- prefix_len = strlen (TRACKER_MINER_DBUS_NAME_PREFIX);
-
- for (l = running; l; l = l->next) {
- MinerData *data;
- const gchar *dbus_name;
- gchar *p;
-
- dbus_name = l->data;
- data = g_slice_new0 (MinerData);
- data->dbus_path = g_strdup_printf ("/%s", dbus_name);
-
- p = data->dbus_path;
- while ((p = strchr (p, '.')) != NULL) {
- *p++ = '/';
- }
-
- data->dbus_name = l->data;
- data->display_name = g_strdup (dbus_name + prefix_len);
- data->description = g_strdup (data->display_name);
- priv->miners = g_list_prepend (priv->miners, data);
- }
-
- g_slist_free (running);
-}
-
-static void
check_file (GFile *file,
gpointer user_data)
{
@@ -808,26 +773,9 @@ static void
initialize_miners_data (TrackerMinerManager *manager)
{
GFile *file;
- const gchar *miners_dir, *miners_dir_disabled;
-
- miners_dir_disabled = g_getenv ("TRACKER_MINERS_DIR_DISABLED");
- if (G_UNLIKELY (miners_dir_disabled != NULL)) {
- miners_dir = TRACKER_MINERS_DIR;
- g_message ("Crawling miners found on DBus not from .desktop files (set in env)");
-
- load_running_miners_only (manager);
- return;
- }
/* Go through service files */
- miners_dir = g_getenv ("TRACKER_MINERS_DIR");
- if (G_LIKELY (miners_dir == NULL)) {
- miners_dir = TRACKER_MINERS_DIR;
- } else {
- g_message ("Crawling miners in '%s' (set in env)", miners_dir);
- }
-
- file = g_file_new_for_path (miners_dir);
+ file = g_file_new_for_path (TRACKER_MINERS_DIR);
directory_foreach (file, ".service", (GFunc) check_file, manager);
g_object_unref (file);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]