aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-09-01 03:44:57 +0800
committerXan Lopez <xan@igalia.com>2012-09-01 03:56:13 +0800
commitba80bf28b56ebcdc42e2ba75bcee7f3b838f58fe (patch)
treed9792db2dec6f8dfe88d92e801870c1c43d6fae3
parentd08cadfb28daad3cc5560d2aaf0815aaeb5bf21a (diff)
downloadgsoc2013-epiphany-ba80bf28b56ebcdc42e2ba75bcee7f3b838f58fe.tar.gz
gsoc2013-epiphany-ba80bf28b56ebcdc42e2ba75bcee7f3b838f58fe.tar.zst
gsoc2013-epiphany-ba80bf28b56ebcdc42e2ba75bcee7f3b838f58fe.zip
ephy-profile-utils: pass the required version to the migrator
This should help catch the mistake of not installing the new migrator when the profile version changes. https://bugzilla.gnome.org/show_bug.cgi?id=683134
-rw-r--r--lib/ephy-profile-utils.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/ephy-profile-utils.c b/lib/ephy-profile-utils.c
index e225c7f3a..ae7771268 100644
--- a/lib/ephy-profile-utils.c
+++ b/lib/ephy-profile-utils.c
@@ -196,19 +196,21 @@ ephy_profile_utils_do_migration (int test_to_run, gboolean debug)
{
gboolean ret;
GError *error = NULL;
- char *index = NULL;
+ char *index = NULL, *version = NULL;
int status;
- char *argv[3] = { EPHY_PROFILE_MIGRATOR };
+ char *argv[5] = { EPHY_PROFILE_MIGRATOR, "-v" };
char *envp[1] = { "EPHY_LOG_MODULES=ephy-profile" };
+ argv[2] = version = g_strdup_printf ("%d", EPHY_PROFILE_MIGRATION_VERSION);
+
if (test_to_run != -1) {
index = g_strdup_printf ("%d", test_to_run);
- argv[1] = "-d";
- argv[2] = index;
- argv[3] = NULL;
+ argv[3] = "-d";
+ argv[4] = index;
+ argv[5] = NULL;
} else {
- argv[1] = NULL;
+ argv[3] = NULL;
}
if (debug)
@@ -218,6 +220,7 @@ ephy_profile_utils_do_migration (int test_to_run, gboolean debug)
NULL, NULL, NULL, NULL,
&status, &error);
g_free (index);
+ g_free (version);
if (error) {
LOG ("Failed to run migrator: %s", error->message);