diff -Nru deja-dup-37.1/debian/changelog deja-dup-37.1/debian/changelog --- deja-dup-37.1/debian/changelog 2018-03-16 19:31:21.000000000 -0400 +++ deja-dup-37.1/debian/changelog 2019-01-11 21:49:35.000000000 -0500 @@ -1,3 +1,12 @@ +deja-dup (37.1-2fakesync1ubuntu0.1) bionic; urgency=medium + + * debian/patches/lp-1804744.patch: + - Fix bug preventing restore on a fresh install if you don't + also set your current backup location to the old backup. + LP: #1804744 + + -- Michael Terry Fri, 11 Jan 2019 21:49:35 -0500 + deja-dup (37.1-2fakesync1) bionic-proposed; urgency=medium * Fake sync due to mismatching orig tarball. diff -Nru deja-dup-37.1/debian/patches/lp-1804744.patch deja-dup-37.1/debian/patches/lp-1804744.patch --- deja-dup-37.1/debian/patches/lp-1804744.patch 1969-12-31 19:00:00.000000000 -0500 +++ deja-dup-37.1/debian/patches/lp-1804744.patch 2019-01-11 21:49:17.000000000 -0500 @@ -0,0 +1,132 @@ +commit 96f3d9ed3a5b83cac5c52a927b376a2d171feb6d +Author: Michael Terry +Date: Fri Jan 4 22:40:16 2019 -0500 + + When restoring, pay more attention to our temporary settings object. + + https://bugs.launchpad.net/deja-dup/+bug/1804744 + +diff --git a/deja-dup/AssistantRestore.vala b/deja-dup/AssistantRestore.vala +index f6e6cf43..cb38965e 100644 +--- a/deja-dup/AssistantRestore.vala ++++ b/deja-dup/AssistantRestore.vala +@@ -83,8 +83,10 @@ public class AssistantRestore : AssistantOperation + + void ensure_config_location() + { +- label_sizes = new Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL); +- config_location = new DejaDup.ConfigLocation(true, true, label_sizes); ++ if (config_location == null) { ++ label_sizes = new Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL); ++ config_location = new DejaDup.ConfigLocation(true, true, label_sizes); ++ } + } + + Gtk.Widget make_backup_location_page() +@@ -228,9 +230,10 @@ public class AssistantRestore : AssistantOperation + "column-spacing", 12, + "border-width", 12); + ++ ensure_config_location(); + label = new Gtk.Label(_("Backup location")); + label.set("xalign", 1.0f, "yalign", 0.0f); +- w = new DejaDup.ConfigLabelLocation(); ++ w = new DejaDup.ConfigLabelLocation(config_location); + w.set("hexpand", true); + page.attach(label, 0, rows, 1, 1); + page.attach(w, 1, rows, 1, 1); +diff --git a/deja-dup/widgets/ConfigLabelLocation.vala b/deja-dup/widgets/ConfigLabelLocation.vala +index 7774956a..c43e3bf7 100644 +--- a/deja-dup/widgets/ConfigLabelLocation.vala ++++ b/deja-dup/widgets/ConfigLabelLocation.vala +@@ -24,32 +24,19 @@ namespace DejaDup { + public class ConfigLabelLocation : ConfigLabel + { + Gtk.Image img; +- FilteredSettings local_root; +- FilteredSettings remote_root; +- FilteredSettings drive_root; +- FilteredSettings goa_root; +- FilteredSettings s3_root; +- FilteredSettings rackspace_root; +- FilteredSettings openstack_root; +- FilteredSettings gcs_root; +- +- public ConfigLabelLocation() ++ public ConfigLocation location {get; construct;} ++ ++ public ConfigLabelLocation(ConfigLocation location) + { +- base(null); ++ Object(key: null, location: location); + } + + construct { + img = new Gtk.Image.from_icon_name("folder", Gtk.IconSize.MENU); + fill_box(); +- watch_key(BACKEND_KEY); +- watch_key(null, (local_root = DejaDup.get_settings(LOCAL_ROOT))); +- watch_key(null, (remote_root = DejaDup.get_settings(REMOTE_ROOT))); +- watch_key(null, (drive_root = DejaDup.get_settings(DRIVE_ROOT))); +- watch_key(null, (goa_root = DejaDup.get_settings(GOA_ROOT))); +- watch_key(null, (s3_root = DejaDup.get_settings(S3_ROOT))); +- watch_key(null, (rackspace_root = DejaDup.get_settings(RACKSPACE_ROOT))); +- watch_key(null, (openstack_root = DejaDup.get_settings(OPENSTACK_ROOT))); +- watch_key(null, (gcs_root = DejaDup.get_settings(GCS_ROOT))); ++ foreach (var setting in location.get_all_settings()) { ++ watch_key(null, setting); ++ } + set_from_config.begin(); + } + +@@ -71,7 +58,7 @@ public class ConfigLabelLocation : ConfigLabel + if (img == null) + return; + +- var backend = Backend.get_default(); ++ var backend = location.get_backend(); + + string desc = backend.get_location_pretty(); + if (desc == null) +diff --git a/deja-dup/widgets/ConfigLocation.vala b/deja-dup/widgets/ConfigLocation.vala +index 8bd092e9..750e745a 100644 +--- a/deja-dup/widgets/ConfigLocation.vala ++++ b/deja-dup/widgets/ConfigLocation.vala +@@ -21,6 +21,16 @@ using GLib; + + namespace DejaDup { + ++bool str_caseless_equal(string a, string b) ++{ ++ return str_equal(a.ascii_down(), b.ascii_down()); ++} ++ ++uint str_caseless_hash(string a) ++{ ++ return str_hash(a.ascii_down()); ++} ++ + public class ConfigLocation : ConfigWidget + { + enum Col { +@@ -98,7 +108,7 @@ public class ConfigLocation : ConfigWidget + accessible.set_name("Location"); + } + +- all_settings = new HashTable(str_hash, str_equal); ++ all_settings = new HashTable(str_caseless_hash, str_caseless_equal); + string[] roots = {"", GOA_ROOT, REMOTE_ROOT, DRIVE_ROOT, LOCAL_ROOT, + S3_ROOT, GCS_ROOT, OPENSTACK_ROOT, RACKSPACE_ROOT}; + foreach (string? root in roots) { +@@ -637,6 +647,11 @@ public class ConfigLocation : ConfigWidget + var sub_settings = all_settings[type]; + return Backend.get_for_type(type, sub_settings); + } ++ ++ public List get_all_settings() ++ { ++ return all_settings.get_values(); ++ } + } + + } diff -Nru deja-dup-37.1/debian/patches/series deja-dup-37.1/debian/patches/series --- deja-dup-37.1/debian/patches/series 2018-03-16 14:31:28.000000000 -0400 +++ deja-dup-37.1/debian/patches/series 2019-01-11 21:49:17.000000000 -0500 @@ -1,2 +1,3 @@ 0001-Exclude-snap-cache-dirs.patch 0002-don-t-use-ulimit.patch +lp-1804744.patch