[epiphany] Reorder search engines migrator to ensure it does not fail



commit 873f4459affd32d07bc631d9610bc2e7feb8fb1a
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sun Mar 25 15:52:24 2018 -0500

    Reorder search engines migrator to ensure it does not fail
    
    The search engines migrator relies on EphyBookmarksManager, so we need
    to move it after the bookmarks timestamp migrator or it will fail. This
    fixes upgrades from old (pre-3.24) versions of Epiphany.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=794645

 lib/ephy-profile-utils.h                     |    2 +-
 src/profile-migrator/ephy-profile-migrator.c |    8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/lib/ephy-profile-utils.h b/lib/ephy-profile-utils.h
index 710b204..dfbd2a5 100644
--- a/lib/ephy-profile-utils.h
+++ b/lib/ephy-profile-utils.h
@@ -24,7 +24,7 @@
 
 G_BEGIN_DECLS
 
-#define EPHY_PROFILE_MIGRATION_VERSION 26
+#define EPHY_PROFILE_MIGRATION_VERSION 27
 #define EPHY_INSECURE_PASSWORDS_MIGRATION_VERSION 11
 #define EPHY_SETTINGS_MIGRATION_VERSION 16
 #define EPHY_FIREFOX_SYNC_PASSWORDS_MIGRATION_VERSION 19
diff --git a/src/profile-migrator/ephy-profile-migrator.c b/src/profile-migrator/ephy-profile-migrator.c
index e01bc99..42e23a0 100644
--- a/src/profile-migrator/ephy-profile-migrator.c
+++ b/src/profile-migrator/ephy-profile-migrator.c
@@ -594,6 +594,9 @@ migrate_settings (void)
   g_settings_sync ();
 }
 
+/* Originally migrator #17, but moved to spot #27 because it uses the
+ * bookmarks manager, which requires that we have already run #24.
+ */
 static void
 migrate_search_engines (void)
 {
@@ -1214,7 +1217,7 @@ const EphyProfileMigrator migrators[] = {
   /* 14 */ migrate_initial_state,
   /* 15 */ migrate_permissions,
   /* 16 */ migrate_settings,
-  /* 17 */ migrate_search_engines,
+  /* 17 */ migrate_nothing,
   /* 18 */ migrate_icon_database,
   /* 19 */ migrate_passwords_to_firefox_sync_passwords,
   /* 20 */ migrate_history_to_firefox_sync_history,
@@ -1223,7 +1226,8 @@ const EphyProfileMigrator migrators[] = {
   /* 23 */ migrate_sync_device_info,
   /* 24 */ migrate_bookmarks_timestamp,
   /* 25 */ migrate_passwords_timestamp,
-  /* 26 */ migrate_nothing
+  /* 26 */ migrate_nothing,
+  /* 27 */ migrate_search_engines
 };
 
 static gboolean


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