From 4a8a0f51849d8414cadfdeb5527820c4a689343a Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Mon, 6 Dec 2010 20:49:27 +0100 Subject: ephy-profile-migration: separate migration code into another binary The migration code is now in the ephy-profile-migrator binary, this means: - epiphany is not linking to NSS anymore - lib/ephy-profile-migration.c was split into: + lib/ephy-profile-migrator.c: the new ephy-profile-migrator binary + lib/ephy-profile-utils.c: convenience _ephy_profile_*_form_auth_data functions. - testing for migration is done without running ephy-profile-migrator Bug #636685 --- src/Makefile.am | 4 ---- src/ephy-main.c | 21 ++++++++++++++++++--- 2 files changed, 18 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 479f5be7a..3068cf541 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -179,10 +179,6 @@ if ENABLE_SEED epiphany_LDADD += $(SEED_LIBS) endif # ENABLE_SEED -if ENABLE_NSS -epiphany_LDADD += $(NSS_LIBS) -endif # ENABLE_NSS - if ENABLE_NETWORK_MANAGER epiphany_LDADD += \ $(NETWORK_MANAGER_LIBS) diff --git a/src/ephy-main.c b/src/ephy-main.c index e172f9f49..f59ab23f9 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -32,7 +32,7 @@ #include "ephy-session.h" #include "ephy-shell.h" #include "ephy-prefs.h" -#include "ephy-profile-migration.h" +#include "ephy-profile-utils.h" #include "ephy-debug.h" #include "eggsmclient.h" @@ -714,8 +714,23 @@ main (int argc, } /* Migrate profile if we are not running a private instance */ - if (ephy_has_private_profile () == FALSE) - _ephy_profile_migrate (); + if (ephy_has_private_profile () == FALSE && + ephy_profile_utils_get_migration_version () < EPHY_PROFILE_MIGRATION_VERSION) + { + GError *error = NULL; + char *argv[1] = { "ephy-profile-migrator" }; + char *envp[1] = { "EPHY_LOG_MODULES=ephy-profile" }; + + g_spawn_sync (NULL, argv, envp, G_SPAWN_SEARCH_PATH, + NULL, NULL, NULL, NULL, + NULL, &error); + + if (error) + { + LOG ("Failed to run migrator: %s", error->message); + g_error_free (error); + } + } ephy_stock_icons_init (); load_accels (); -- cgit v1.2.3