Marco Trevisan (Treviño) has proposed merging ~3v1n0/ubuntu/+source/gnome-calculator:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-calculator:ubuntu/master.
Requested reviews: Ubuntu Desktop (ubuntu-desktop) Related bugs: Bug #1795399 in gnome-calculator (Ubuntu): "gnome-calculator-search-provider aborts in search_provider_solve_equation_co" https://bugs.launchpad.net/ubuntu/+source/gnome-calculator/+bug/1795399 For more details, see: https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-calculator/+git/gnome-calculator/+merge/355919 -- Your team Ubuntu Desktop is requested to review the proposed merge of ~3v1n0/ubuntu/+source/gnome-calculator:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-calculator:ubuntu/master.
diff --git a/debian/changelog b/debian/changelog index 2ced402..5c2d059 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,13 @@ gnome-calculator (1:3.30.0-1ubuntu2) UNRELEASED; urgency=medium * debian/control: - Use Ubuntu Vcs-* URIs, and move debian's to XS-Debian-Vcs-* + * debian/patches/search-provider-Handle-errors-gracefully.patch: + - Add patch to avoid exiting with fatal errors when a spawn error occurred + (LP: #1795399) + * debian/patches: refreshed mentioning when applied + * debian/gbp.conf: add debian default's suggested settings - -- Marco Trevisan (Treviño) <ma...@ubuntu.com> Wed, 05 Sep 2018 15:35:38 +0200 + -- Marco Trevisan (Treviño) <ma...@ubuntu.com> Mon, 01 Oct 2018 15:30:25 +0200 gnome-calculator (1:3.30.0-1ubuntu1) cosmic; urgency=medium diff --git a/debian/gbp.conf b/debian/gbp.conf index 6062590..7fed487 100644 --- a/debian/gbp.conf +++ b/debian/gbp.conf @@ -4,3 +4,15 @@ debian-branch=ubuntu/master debian-tag=ubuntu/%(version)s upstream-branch=upstream/latest upstream-vcs-tag = %(version)s + +[buildpackage] +sign-tags = True + +[dch] +multimaint-merge = True + +[import-orig] +postimport = dch -v%(version)s New upstream release; git add debian/changelog; debcommit + +[pq] +patch-numbers = False diff --git a/debian/patches/search-provider-Handle-errors-gracefully.patch b/debian/patches/search-provider-Handle-errors-gracefully.patch new file mode 100644 index 0000000..f78c54b --- /dev/null +++ b/debian/patches/search-provider-Handle-errors-gracefully.patch @@ -0,0 +1,108 @@ +From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <m...@3v1n0.net> +Date: Wed, 5 Sep 2018 17:11:27 +0200 +Subject: search-provider: Handle errors gracefully + +Instead of exiting immediately if a spawn error occurred, inform our dbus +client about it with a proper spawn error. + +As bonus, get rid of the compile warning. + +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gnome-calculator/+bug/1795399 +Forwarded: https://gitlab.gnome.org/GNOME/gnome-calculator/merge_requests/10 +Applied-Upstream: yes, 3.31.1 +--- + search-provider/search-provider.vala | 24 +++++++++++++----------- + 1 file changed, 13 insertions(+), 11 deletions(-) + +diff --git a/search-provider/search-provider.vala b/search-provider/search-provider.vala +index fc72128..a48c440 100644 +--- a/search-provider/search-provider.vala ++++ b/search-provider/search-provider.vala +@@ -63,7 +63,7 @@ public class SearchProvider : Object + } + catch (Error e) + { +- error ("Failed to spawn Calculator: %s", e.message); ++ throw e; + } + + if (cancellable == null) +@@ -79,7 +79,7 @@ public class SearchProvider : Object + return subprocess; + } + +- private async bool solve_equation (string equation) ++ private async bool solve_equation (string equation) throws DBusError + { + string? result; + +@@ -112,7 +112,8 @@ public class SearchProvider : Object + } + catch (SpawnError e) + { +- error ("Failed to spawn Calculator: %s", e.message); ++ critical ("Failed to spawn Calculator: %s", e.message); ++ throw new DBusError.SPAWN_FAILED (e.message); + } + catch (Error e) + { +@@ -128,7 +129,7 @@ public class SearchProvider : Object + return true; + } + +- private async string[] get_result_identifier (string[] terms) ++ private async string[] get_result_identifier (string[] terms) throws Error + { + /* We have at most one result: the search terms as one string */ + var equation = terms_to_equation (terms); +@@ -138,17 +139,17 @@ public class SearchProvider : Object + return new string[0]; + } + +- public async string[] get_initial_result_set (string[] terms) ++ public async string[] get_initial_result_set (string[] terms) throws Error + { + return yield get_result_identifier (terms); + } + +- public async string[] get_subsearch_result_set (string[] previous_results, string[] terms) ++ public async string[] get_subsearch_result_set (string[] previous_results, string[] terms) throws Error + { + return yield get_result_identifier (terms); + } + +- public async HashTable<string, Variant>[] get_result_metas (string[] results, GLib.BusName sender) ++ public async HashTable<string, Variant>[] get_result_metas (string[] results, GLib.BusName sender) throws Error + requires (results.length == 1) + { + string equation; +@@ -171,7 +172,7 @@ public class SearchProvider : Object + return metadata; + } + +- private static void spawn_and_display_equation (string[] terms) ++ private static void spawn_and_display_equation (string[] terms) throws Error + { + try + { +@@ -180,16 +181,17 @@ public class SearchProvider : Object + } + catch (SpawnError e) + { +- error ("Failed to spawn Calculator: %s", e.message); ++ critical ("Failed to spawn Calculator: %s", e.message); ++ throw new DBusError.SPAWN_FAILED (e.message); + } + } + +- public void activate_result (string result, string[] terms, uint32 timestamp) ++ public void activate_result (string result, string[] terms, uint32 timestamp) throws Error + { + spawn_and_display_equation (terms); + } + +- public void launch_search (string[] terms, uint32 timestamp) ++ public void launch_search (string[] terms, uint32 timestamp) throws Error + { + spawn_and_display_equation (terms); + } diff --git a/debian/patches/search-provider-Use-async-calls-cancel-search-on-inactivi.patch b/debian/patches/search-provider-Use-async-calls-cancel-search-on-inactivi.patch index 324be46..d8e38be 100644 --- a/debian/patches/search-provider-Use-async-calls-cancel-search-on-inactivi.patch +++ b/debian/patches/search-provider-Use-async-calls-cancel-search-on-inactivi.patch @@ -21,6 +21,7 @@ going to be available on next version of the Search provider protocol Bug-Ubuntu: https://launchpad.net/bugs/1756826 Bug-GNOME: https://gitlab.gnome.org/GNOME/gnome-shell/issues/183 Forwarded: https://gitlab.gnome.org/GNOME/gnome-calculator/merge_requests/10 +Applied-Upstream: yes, 3.31.1 --- search-provider/search-provider.vala | 126 +++++++++++++++++++++++++---------- 1 file changed, 89 insertions(+), 37 deletions(-) diff --git a/debian/patches/search-provider-Use-lower-inactivity-timeout.patch b/debian/patches/search-provider-Use-lower-inactivity-timeout.patch index b5b0dd6..5008fe5 100644 --- a/debian/patches/search-provider-Use-lower-inactivity-timeout.patch +++ b/debian/patches/search-provider-Use-lower-inactivity-timeout.patch @@ -9,6 +9,7 @@ will return invalid values before that the timeout has been hit. Bug-Ubuntu: https://launchpad.net/bugs/1756826 Bug-GNOME: https://gitlab.gnome.org/GNOME/gnome-shell/issues/183 Forwarded: https://gitlab.gnome.org/GNOME/gnome-calculator/merge_requests/10 +Applied-Upstream: yes, 3.31.1 --- search-provider/search-provider.vala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/patches/search-provider-cache-equations-avoiding-spawning-calcula.patch b/debian/patches/search-provider-cache-equations-avoiding-spawning-calcula.patch index b3903df..85d83ce 100644 --- a/debian/patches/search-provider-cache-equations-avoiding-spawning-calcula.patch +++ b/debian/patches/search-provider-cache-equations-avoiding-spawning-calcula.patch @@ -16,6 +16,7 @@ just kill all the related processes one time at once. Bug-Ubuntu: https://launchpad.net/bugs/1756826 Bug-GNOME: https://gitlab.gnome.org/GNOME/gnome-shell/issues/183 Forwarded: https://gitlab.gnome.org/GNOME/gnome-calculator/merge_requests/10 +Applied-Upstream: yes, 3.31.1 --- search-provider/search-provider.vala | 79 ++++++++++++++++++++---------------- 1 file changed, 45 insertions(+), 34 deletions(-) diff --git a/debian/patches/search-provider-cache-only-a-limited-number-of-equations.patch b/debian/patches/search-provider-cache-only-a-limited-number-of-equations.patch index ca1c342..651aa28 100644 --- a/debian/patches/search-provider-cache-only-a-limited-number-of-equations.patch +++ b/debian/patches/search-provider-cache-only-a-limited-number-of-equations.patch @@ -5,6 +5,7 @@ Subject: search-provider: cache only a limited number of equations Bug-Ubuntu: https://launchpad.net/bugs/1756826 Bug-GNOME: https://gitlab.gnome.org/GNOME/gnome-shell/issues/183 Forwarded: https://gitlab.gnome.org/GNOME/gnome-calculator/merge_requests/10 +Applied-Upstream: yes, 3.31.1 --- search-provider/search-provider.vala | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/debian/patches/search-provider-cancel-the-current-process-on-new-calcula.patch b/debian/patches/search-provider-cancel-the-current-process-on-new-calcula.patch index 801d844..26435e2 100644 --- a/debian/patches/search-provider-cancel-the-current-process-on-new-calcula.patch +++ b/debian/patches/search-provider-cancel-the-current-process-on-new-calcula.patch @@ -10,6 +10,7 @@ we need to compute. Bug-Ubuntu: https://launchpad.net/bugs/1756826 Bug-GNOME: https://gitlab.gnome.org/GNOME/gnome-shell/issues/183 Forwarded: https://gitlab.gnome.org/GNOME/gnome-calculator/merge_requests/10 +Applied-Upstream: yes, 3.31.1 --- search-provider/search-provider.vala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/patches/search-provider-renew-inactivity-timeout-at-each-calculat.patch b/debian/patches/search-provider-renew-inactivity-timeout-at-each-calculat.patch index 41458ad..274aae1 100644 --- a/debian/patches/search-provider-renew-inactivity-timeout-at-each-calculat.patch +++ b/debian/patches/search-provider-renew-inactivity-timeout-at-each-calculat.patch @@ -10,6 +10,7 @@ So, everytime we do a subprocess call, let's renew the application timeout. Bug-Ubuntu: https://launchpad.net/bugs/1756826 Bug-GNOME: https://gitlab.gnome.org/GNOME/gnome-shell/issues/183 Forwarded: https://gitlab.gnome.org/GNOME/gnome-calculator/merge_requests/100 +Applied-Upstream: yes, 3.31.1 --- search-provider/search-provider.vala | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/debian/patches/search-provider-simplify-solve_subprocess.patch b/debian/patches/search-provider-simplify-solve_subprocess.patch index 7dc1d78..4f9cde8 100644 --- a/debian/patches/search-provider-simplify-solve_subprocess.patch +++ b/debian/patches/search-provider-simplify-solve_subprocess.patch @@ -8,6 +8,7 @@ the actual operation to perform. Bug-Ubuntu: https://launchpad.net/bugs/1756826 Bug-GNOME: https://gitlab.gnome.org/GNOME/gnome-shell/issues/183 Forwarded: https://gitlab.gnome.org/GNOME/gnome-calculator/merge_requests/10 +Applied-Upstream: yes, 3.31.1 --- search-provider/search-provider.vala | 49 ++++++++++-------------------------- 1 file changed, 13 insertions(+), 36 deletions(-) diff --git a/debian/patches/series b/debian/patches/series index 4fd8ad8..2755c44 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,4 +5,5 @@ search-provider-simplify-solve_subprocess.patch search-provider-cancel-the-current-process-on-new-calcula.patch search-provider-cache-equations-avoiding-spawning-calcula.patch search-provider-cache-only-a-limited-number-of-equations.patch +search-provider-Handle-errors-gracefully.patch ubuntu/search-provider-Cancel-operations-on-XUbuntuCancel.patch diff --git a/debian/patches/ubuntu/search-provider-Cancel-operations-on-XUbuntuCancel.patch b/debian/patches/ubuntu/search-provider-Cancel-operations-on-XUbuntuCancel.patch index 77939ec..edc9419 100644 --- a/debian/patches/ubuntu/search-provider-Cancel-operations-on-XUbuntuCancel.patch +++ b/debian/patches/ubuntu/search-provider-Cancel-operations-on-XUbuntuCancel.patch @@ -15,7 +15,7 @@ Forwarded: not-needed 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/search-provider/search-provider.vala b/search-provider/search-provider.vala -index fc72128..b7c869d 100644 +index a48c440..9823ef7 100644 --- a/search-provider/search-provider.vala +++ b/search-provider/search-provider.vala @@ -10,11 +10,33 @@ @@ -60,38 +60,38 @@ index fc72128..b7c869d 100644 queued_equations = new Queue<string> (); cached_equations = new HashTable<string, string> (str_hash, str_equal); } -@@ -128,8 +151,10 @@ public class SearchProvider : Object +@@ -129,8 +152,10 @@ public class SearchProvider : Object return true; } -- private async string[] get_result_identifier (string[] terms) -+ private async string[] get_result_identifier (string[] terms, GLib.BusName sender) +- private async string[] get_result_identifier (string[] terms) throws Error ++ private async string[] get_result_identifier (string[] terms, GLib.BusName sender) throws Error { + var owner = new Caller (caller_tracker, sender); (void) owner; + /* We have at most one result: the search terms as one string */ var equation = terms_to_equation (terms); if (yield solve_equation (equation)) -@@ -138,14 +163,14 @@ public class SearchProvider : Object +@@ -139,14 +164,14 @@ public class SearchProvider : Object return new string[0]; } -- public async string[] get_initial_result_set (string[] terms) -+ public async string[] get_initial_result_set (string[] terms, GLib.BusName sender) +- public async string[] get_initial_result_set (string[] terms) throws Error ++ public async string[] get_initial_result_set (string[] terms, GLib.BusName sender) throws Error { - return yield get_result_identifier (terms); + return yield get_result_identifier (terms, sender); } -- public async string[] get_subsearch_result_set (string[] previous_results, string[] terms) -+ public async string[] get_subsearch_result_set (string[] previous_results, string[] terms, GLib.BusName sender) +- public async string[] get_subsearch_result_set (string[] previous_results, string[] terms) throws Error ++ public async string[] get_subsearch_result_set (string[] previous_results, string[] terms, GLib.BusName sender) throws Error { - return yield get_result_identifier (terms); + return yield get_result_identifier (terms, sender); } - public async HashTable<string, Variant>[] get_result_metas (string[] results, GLib.BusName sender) -@@ -154,6 +179,8 @@ public class SearchProvider : Object + public async HashTable<string, Variant>[] get_result_metas (string[] results, GLib.BusName sender) throws Error +@@ -155,6 +180,8 @@ public class SearchProvider : Object string equation; string result; @@ -100,7 +100,7 @@ index fc72128..b7c869d 100644 equation = terms_to_equation (results); if (!yield solve_equation (equation)) -@@ -171,6 +198,15 @@ public class SearchProvider : Object +@@ -172,6 +199,15 @@ public class SearchProvider : Object return metadata; } @@ -113,6 +113,6 @@ index fc72128..b7c869d 100644 + } + } + - private static void spawn_and_display_equation (string[] terms) + private static void spawn_and_display_equation (string[] terms) throws Error { try
-- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop