[tracker/rss-enclosures] tracker-miner-fs: Remove --add-file option



commit 481c5fa01f8436f995c489fdeea1c92c141ccd5b
Author: Martyn Russell <martyn lanedo com>
Date:   Tue Aug 24 16:06:01 2010 +0100

    tracker-miner-fs: Remove --add-file option
    
    This is now supplied with tracker-control --index-file
    Updated the man pages too

 docs/manpages/tracker-control.1  |    7 ++++-
 docs/manpages/tracker-miner-fs.1 |    6 ----
 src/miners/fs/tracker-main.c     |   50 +++++++++----------------------------
 3 files changed, 17 insertions(+), 46 deletions(-)
---
diff --git a/docs/manpages/tracker-control.1 b/docs/manpages/tracker-control.1
index d8c0e9e..97a23b2 100644
--- a/docs/manpages/tracker-control.1
+++ b/docs/manpages/tracker-control.1
@@ -21,6 +21,9 @@ are running and which ones are installed.
 .B \-?, \-\-help
 Show summary of options.
 .TP
+.B \-V, \-\-version
+Returns the version of this binary.
+.TP
 .B \-k, \-\-kill=[all|store|miners]
 This uses SIGKILL to stop all Tracker processes found matching the
 parameter, if no extra parameter is passed,
@@ -70,8 +73,8 @@ files. You can use
 .B \-\-reindex-mime-type
 more than once per \fIMIME\fR type.
 .TP
-.B \-V, \-\-version
-Print version.
+.B \-f, \-\-index-file=FILE
+(Re)index a file matching the \fIFILE\fR type supplied.
 
 .SH SEE ALSO
 .BR tracker-status (1),
diff --git a/docs/manpages/tracker-miner-fs.1 b/docs/manpages/tracker-miner-fs.1
index a8cec5b..c2870db 100644
--- a/docs/manpages/tracker-miner-fs.1
+++ b/docs/manpages/tracker-miner-fs.1
@@ -41,12 +41,6 @@ would be monitored for changes. This works with non-existing
 arguments as well as existing 
 .B FILE
 arguments.
-.TP
-.B \-a, \-\-add\-file=FILE
-Forces the addition of
-.B FILE
-into the database, regardless of configuration settings. This option
-is mostly meant for testing purposes.
 
 .SH FILES
 .I $HOME/.config/tracker/tracker-miner-fs.cfg
diff --git a/src/miners/fs/tracker-main.c b/src/miners/fs/tracker-main.c
index 7c2151a..5186369 100644
--- a/src/miners/fs/tracker-main.c
+++ b/src/miners/fs/tracker-main.c
@@ -72,7 +72,6 @@ static gboolean finished_miners;
 static gint verbosity = -1;
 static gint initial_sleep = -1;
 static gchar *eligible;
-static gchar *add_file;
 static gboolean version;
 
 static GOptionEntry entries[] = {
@@ -90,10 +89,6 @@ static GOptionEntry entries[] = {
 	  G_OPTION_ARG_FILENAME, &eligible,
 	  N_("Checks if FILE is eligible for being mined based on configuration"),
 	  N_("FILE") },
-	{ "add-file", 'a', 0,
-	  G_OPTION_ARG_FILENAME, &add_file,
-	  N_("Forces the insertion of FILE into the store"),
-	  N_("FILE") },
 	{ "version", 'V', 0,
 	  G_OPTION_ARG_NONE, &version,
 	  N_("Displays version information"),
@@ -266,20 +261,11 @@ miner_finished_cb (TrackerMinerFS *fs,
                    guint           total_files_ignored,
                    gpointer        user_data)
 {
-	GMainLoop *main_loop = user_data;
-
 	g_message ("Finished mining in seconds:%f, total directories:%d, total files:%d",
 	           seconds_elapsed,
 	           total_directories_found,
 	           total_files_found);
 
-	if (add_file && main_loop) {
-		/* We were waiting for a file to be processed, now it's safe to quit */
-		GMainLoop *main_loop = user_data;
-		g_main_loop_quit (main_loop);
-		return;
-	}
-
 	if (TRACKER_IS_MINER_FILES (fs) &&
 	    tracker_miner_fs_get_initial_crawling (fs)) {
 		tracker_db_manager_set_last_crawl_done (TRUE);
@@ -626,23 +612,13 @@ main (gint argc, gchar *argv[])
 
 	main_loop = g_main_loop_new (NULL, FALSE);
 
-	if (!add_file) {
-		miner_files = tracker_miner_files_new (config);
-		tracker_miner_fs_set_initial_crawling (TRACKER_MINER_FS (miner_files),
-		                                       should_crawl (config));
-	} else {
-		GFile *file;
-
-		file = g_file_new_for_commandline_arg (add_file);
-		miner_files = tracker_miner_files_new (NULL);
-
-		tracker_miner_fs_check_file (TRACKER_MINER_FS (miner_files), file, FALSE);
-		g_object_unref (file);
-	}
+	miner_files = tracker_miner_files_new (config);
+	tracker_miner_fs_set_initial_crawling (TRACKER_MINER_FS (miner_files),
+	                                       should_crawl (config));
 
 	g_signal_connect (miner_files, "finished",
 			  G_CALLBACK (miner_finished_cb),
-			  main_loop);
+			  NULL);
 
 	object = tracker_miner_files_index_new (TRACKER_MINER_FILES (miner_files));
 
@@ -666,18 +642,16 @@ main (gint argc, gchar *argv[])
 		return EXIT_FAILURE;
 	}
 
-	if (!add_file) {
-		/* Create miner for applications */
-		miner_applications = tracker_miner_applications_new ();
-		miners = g_slist_append (miners, miner_applications);
+	/* Create miner for applications */
+	miner_applications = tracker_miner_applications_new ();
+	miners = g_slist_append (miners, miner_applications);
 
-		g_signal_connect (miner_applications, "finished",
-				  G_CALLBACK (miner_finished_cb),
-				  NULL);
+	g_signal_connect (miner_applications, "finished",
+	                  G_CALLBACK (miner_finished_cb),
+	                  NULL);
 
-		/* Create miner for files */
-		miners = g_slist_append (miners, miner_files);
-	}
+	/* Create miner for files */
+	miners = g_slist_append (miners, miner_files);
 
 	tracker_thumbnailer_init ();
 



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