[evolution] Kill the killev program, and the whole tools directory.



commit 461f022eb7fae7147845797c0544304ae35c7e8b
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Sep 18 11:55:12 2009 -0400

    Kill the killev program, and the whole tools directory.
    
    The --force-shutdown option now simply runs "pkill evolution".

 Makefile.am                       |    1 -
 configure.ac                      |    1 -
 shell/Makefile.am                 |    3 +-
 shell/main.c                      |   39 ++-
 tools/Makefile.am                 |   33 --
 tools/killev.c                    |  213 ------------
 tools/verify-evolution-install.sh |  640 -------------------------------------
 7 files changed, 31 insertions(+), 899 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 53b463b..d88ad13 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -63,7 +63,6 @@ SUBDIRS = 			\
 	doc			\
 	ui			\
 	views			\
-	tools			\
 	po			\
 	sounds			\
 	$(HELP_SUBDIR)
diff --git a/configure.ac b/configure.ac
index 2853155..cd149a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2073,7 +2073,6 @@ smime/Makefile
 smime/lib/Makefile
 smime/gui/Makefile
 sounds/Makefile
-tools/Makefile
 evolution-zip
 evolution-shell.pc
 evolution-plugin.pc
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 7358a14..edc143e 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -8,7 +8,7 @@ AM_CPPFLAGS =							\
 	-I$(top_srcdir)/widgets/misc				\
 	-I$(top_srcdir)						\
 	-I$(top_srcdir)/shell					\
-	-I$(top_builddir)/shell                                 \
+	-DEVOLUTION_BINDIR=\""$(bindir)"\"			\
 	-DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"		\
 	-DEVOLUTION_LOCALEDIR=\""$(localedir)"\"		\
 	-DEVOLUTION_DATADIR=\""$(datadir)"\"			\
@@ -18,7 +18,6 @@ AM_CPPFLAGS =							\
 	-DEVOLUTION_MODULEDIR=\""$(moduledir)"\"		\
 	-DEVOLUTION_RULEDIR=\""$(privdatadir)"\"		\
 	-DEVOLUTION_UIDIR=\""$(evolutionuidir)"\"		\
-	-DEVOLUTION_TOOLSDIR=\""$(privlibexecdir)"\"		\
 	-DPREFIX=\""$(prefix)"\"				\
 	-DSYSCONFDIR=\""$(sysconfdir)"\"			\
 	-DDATADIR=\""$(datadir)"\"				\
diff --git a/shell/main.c b/shell/main.c
index a74e28a..7ce930f 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -329,7 +329,7 @@ static GOptionEntry entries[] = {
 	  N_("Start in online mode"), NULL },
 #ifdef KILL_PROCESS_CMD
 	{ "force-shutdown", '\0', 0, G_OPTION_ARG_NONE, &force_shutdown,
-	  N_("Forcibly shut down all Evolution components"), NULL },
+	  N_("Forcibly shut down Evolution"), NULL },
 #endif
 #ifdef DEVELOPMENT
 	{ "force-migrate", '\0', 0, G_OPTION_ARG_NONE, &force_migrate,
@@ -392,6 +392,33 @@ set_paths (void)
 }
 #endif
 
+static void G_GNUC_NORETURN
+shell_force_shutdown (void)
+{
+	gchar *program;
+
+	/* This is not as destructive as it was in the Bonobo era.
+	 * The Evolution-Data-Server D-Bus services should not be killed
+	 * because other programs may be using them.  The alarm daemon is
+	 * an autostart program now and Evolution no longer spawns it, so
+	 * that should not be killed either.  The only thing left to do
+	 * really is shoot ourselves. */
+
+	/* XXX Maybe --force-shutdown should be deprecated. */
+
+	program = g_find_program_in_path ("pkill");
+
+	if (program == NULL) {
+		g_printerr ("Could not find `pkill' program in path.\n");
+		exit (1);
+	}
+
+	/* This does not return. */
+	execl (program, "pkill", "evolution", NULL);
+
+	g_assert_not_reached ();
+}
+
 static void
 shell_window_destroyed_cb (EShell *shell)
 {
@@ -475,7 +502,6 @@ main (gint argc, gchar **argv)
 #ifdef DEVELOPMENT
 	gboolean skip_warning_dialog;
 #endif
-	gchar *filename;
 	GError *error = NULL;
 
 	/* Make ElectricFence work.  */
@@ -520,13 +546,8 @@ main (gint argc, gchar **argv)
 		exit (1);
 	}
 
-	if (force_shutdown) {
-		filename = g_build_filename (
-			EVOLUTION_TOOLSDIR, "killev", NULL);
-		execl (filename, "killev", NULL);
-		/* Not reached */
-		exit (0);
-	}
+	if (force_shutdown)
+		shell_force_shutdown ();
 
 	client = gconf_client_get_default ();
 



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