tracker r3033 - in trunk: . src/tracker-extract src/tracker-indexer src/trackerd
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r3033 - in trunk: . src/tracker-extract src/tracker-indexer src/trackerd
- Date: Mon, 9 Mar 2009 12:03:00 +0000 (UTC)
Author: mr
Date: Mon Mar 9 12:02:59 2009
New Revision: 3033
URL: http://svn.gnome.org/viewvc/tracker?rev=3033&view=rev
Log:
* src/tracker-extract/tracker-main.c:
* src/tracker-indexer/tracker-main.c:
* src/trackerd/tracker-main.c: Remove copyright and version
information on startup. There were reports of .xsession-errors
being populated with this information. Now version information is
available with -V. Removed copyright because it was solely to
Jamie which it no longer is.
Modified:
trunk/ChangeLog
trunk/src/tracker-extract/tracker-main.c
trunk/src/tracker-indexer/tracker-main.c
trunk/src/trackerd/tracker-main.c
Modified: trunk/src/tracker-extract/tracker-main.c
==============================================================================
--- trunk/src/tracker-extract/tracker-main.c (original)
+++ trunk/src/tracker-extract/tracker-main.c Mon Mar 9 12:02:59 2009
@@ -46,8 +46,7 @@
#include "tracker-extract.h"
#define ABOUT \
- "Tracker " PACKAGE_VERSION "\n" \
- "Copyright (c) 2005-2008 Jamie McCracken (jamiemcc gnome org)\n"
+ "Tracker " PACKAGE_VERSION "\n"
#define LICENSE \
"This program is free software and comes without any warranty.\n" \
@@ -61,11 +60,16 @@
static GMainLoop *main_loop;
static guint quit_timeout_id;
+static gboolean version;
static gint verbosity = -1;
static gchar *filename;
static gchar *mime_type;
static GOptionEntry entries[] = {
+ { "version", 'V', 0,
+ G_OPTION_ARG_NONE, &version,
+ N_("Displays version information"),
+ NULL },
{ "verbosity", 'v', 0,
G_OPTION_ARG_INT, &verbosity,
N_("Logging, 0 = errors only, "
@@ -206,7 +210,12 @@
g_option_context_free (context);
- g_print ("\n" ABOUT "\n" LICENSE "\n");
+ if (version) {
+ g_print ("\n" ABOUT "\n" LICENSE "\n");
+ return EXIT_SUCCESS;
+ }
+
+ g_print ("Initializing tracker-extract...\n");
initialize_signal_handler ();
Modified: trunk/src/tracker-indexer/tracker-main.c
==============================================================================
--- trunk/src/tracker-indexer/tracker-main.c (original)
+++ trunk/src/tracker-indexer/tracker-main.c Mon Mar 9 12:02:59 2009
@@ -54,8 +54,7 @@
#include "tracker-push.h"
#define ABOUT \
- "Tracker " PACKAGE_VERSION "\n" \
- "Copyright (c) 2005-2008 Jamie McCracken (jamiemcc gnome org)\n"
+ "Tracker " PACKAGE_VERSION "\n"
#define LICENSE \
"This program is free software and comes without any warranty.\n" \
@@ -69,12 +68,17 @@
static GMainLoop *main_loop;
static guint quit_timeout_id;
+static gboolean version;
static gint verbosity = -1;
-static gboolean process_all = FALSE;
-static gboolean run_forever = FALSE;
-static gchar **modules = NULL;
+static gboolean process_all;
+static gboolean run_forever;
+static gchar **modules;
static GOptionEntry entries[] = {
+ { "version", 'V', 0,
+ G_OPTION_ARG_NONE, &version,
+ N_("Displays version information"),
+ NULL },
{ "verbosity", 'v', 0,
G_OPTION_ARG_INT, &verbosity,
N_("Logging, 0 = errors only, "
@@ -324,7 +328,11 @@
g_option_context_parse (context, &argc, &argv, &error);
g_option_context_free (context);
- g_print ("\n" ABOUT "\n" LICENSE "\n");
+ if (version) {
+ g_print ("\n" ABOUT "\n" LICENSE "\n");
+ return EXIT_SUCCESS;
+ }
+
g_print ("Initializing tracker-indexer...\n");
initialize_signal_handler ();
Modified: trunk/src/trackerd/tracker-main.c
==============================================================================
--- trunk/src/trackerd/tracker-main.c (original)
+++ trunk/src/trackerd/tracker-main.c Mon Mar 9 12:02:59 2009
@@ -79,8 +79,7 @@
#endif
#define ABOUT \
- "Tracker " PACKAGE_VERSION "\n" \
- "Copyright (c) 2005-2008 Jamie McCracken (jamiemcc gnome org)\n"
+ "Tracker " PACKAGE_VERSION "\n"
#define LICENSE \
"This program is free software and comes without any warranty.\n" \
@@ -114,9 +113,10 @@
} TrackerMainPrivate;
/* Private */
-static GStaticPrivate private_key = G_STATIC_PRIVATE_INIT;
+static GStaticPrivate private_key = G_STATIC_PRIVATE_INIT;
/* Private command line parameters */
+static gboolean version;
static gint verbosity = -1;
static gint initial_sleep = -1;
static gboolean low_memory;
@@ -129,7 +129,12 @@
static gboolean disable_indexing;
static gchar *language_code;
-static GOptionEntry entries_daemon[] = {
+static GOptionEntry entries[] = {
+ /* Daemon options */
+ { "version", 'V', 0,
+ G_OPTION_ARG_NONE, &version,
+ N_("Displays version information"),
+ NULL },
{ "verbosity", 'v', 0,
G_OPTION_ARG_INT, &verbosity,
N_("Logging, 0 = errors only, "
@@ -159,10 +164,8 @@
G_OPTION_ARG_STRING_ARRAY, &disable_modules,
N_("Disable modules from being processed (you can do -d <module> -d <module>)"),
NULL },
- { NULL }
-};
-static GOptionEntry entries_indexer[] = {
+ /* Indexer options */
{ "force-reindex", 'r', 0,
G_OPTION_ARG_NONE, &force_reindex,
N_("Force a re-index of all content"),
@@ -847,7 +850,6 @@
main (gint argc, gchar *argv[])
{
GOptionContext *context = NULL;
- GOptionGroup *group;
GError *error = NULL;
TrackerMainPrivate *private;
TrackerConfig *config;
@@ -887,25 +889,7 @@
* usage string - Usage: COMMAND <THIS_MESSAGE>
*/
context = g_option_context_new (_("- start the tracker daemon"));
-
- /* Daemon group */
- group = g_option_group_new ("daemon",
- _("Daemon Options"),
- _("Show daemon options"),
- NULL,
- NULL);
- g_option_group_add_entries (group, entries_daemon);
- g_option_context_add_group (context, group);
-
- /* Indexer group */
- group = g_option_group_new ("indexer",
- _("Indexer Options"),
- _("Show indexer options"),
- NULL,
- NULL);
- g_option_group_add_entries (group, entries_indexer);
- g_option_context_add_group (context, group);
-
+ g_option_context_add_main_entries (context, entries, NULL);
g_option_context_parse (context, &argc, &argv, &error);
g_option_context_free (context);
@@ -915,8 +899,12 @@
return EXIT_FAILURE;
}
- /* Print information */
- g_print ("\n" ABOUT "\n" LICENSE "\n");
+ if (version) {
+ /* Print information */
+ g_print ("\n" ABOUT "\n" LICENSE "\n");
+ return EXIT_SUCCESS;
+ }
+
g_print ("Initializing trackerd...\n");
initialize_signal_handler ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]