[tracker/sam/tracker-2.3-developer-experience: 45/45] Add TRACKER_MINER_SERVICES_DIR environment variable
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/sam/tracker-2.3-developer-experience: 45/45] Add TRACKER_MINER_SERVICES_DIR environment variable
- Date: Wed, 2 Oct 2019 11:57:23 +0000 (UTC)
commit 4dbda4376bf18127d7effc2476a2ceec4b9f2c84
Author: Sam Thursfield <sam afuera me uk>
Date: Sun Sep 29 17:23:49 2019 +0200
Add TRACKER_MINER_SERVICES_DIR environment variable
This is needed to make certain Tracker commands work when running
Tracker from the build tree, without installing it (as we do for
the functional-tests and with the new run-uninstalled script).
Without it, `tracker daemon status` and `tracker index` will look
for .service files in $prefix/share/tracker/miners which may fail.
src/libtracker-control/tracker-miner-manager.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/libtracker-control/tracker-miner-manager.c b/src/libtracker-control/tracker-miner-manager.c
index 740eae30d..c68be8d03 100644
--- a/src/libtracker-control/tracker-miner-manager.c
+++ b/src/libtracker-control/tracker-miner-manager.c
@@ -820,9 +820,16 @@ static void
initialize_miners_data (TrackerMinerManager *manager)
{
GFile *file;
+ const gchar *miners_dir;
+
+ if (g_getenv("TRACKER_MINER_SERVICES_DIR") != NULL) {
+ miners_dir = g_getenv("TRACKER_MINER_SERVICES_DIR");
+ } else {
+ miners_dir = TRACKER_MINERS_DIR;
+ }
/* Go through service files */
- file = g_file_new_for_path (TRACKER_MINERS_DIR);
+ file = g_file_new_for_path (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]