Merge lp:~jeremywootten/appcenter/fix-1624186-reappear-after-install into lp:~elementary-apps/appcenter/appcenter

Proposed by Jeremy Wootten
Status: Merged
Approved by: Danielle Foré
Approved revision: 298
Merged at revision: 298
Proposed branch: lp:~jeremywootten/appcenter/fix-1624186-reappear-after-install
Merge into: lp:~elementary-apps/appcenter/appcenter
Diff against target: 30 lines (+8/-6)
1 file modified
src/Core/Client.vala (+8/-6)
To merge this branch: bzr merge lp:~jeremywootten/appcenter/fix-1624186-reappear-after-install
Reviewer Review Type Date Requested Status
Danielle Foré Approve
Review via email: mp+306027@code.launchpad.net

Commit message

ensure that changes_information is cleared from a package after successful updating so that the "updates_available" property returns the correct value.

Description of the change

This branch ensures the changes_information are cleared from a package after successful updating so that the "updates_available" property returns the correct value.

To post a comment you must log in.
Revision history for this message
Danielle Foré (danrabbit) wrote :

Does what it says on the tin

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Core/Client.vala'
2--- src/Core/Client.vala 2016-09-11 20:19:38 +0000
3+++ src/Core/Client.vala 2016-09-17 13:56:59 +0000
4@@ -160,19 +160,21 @@
5 sc.inhibit ();
6 var results = yield update_task.update_packages_async (packages_ids, cancellable, cb);
7 exit_status = results.get_exit_code ();
8- if (exit_status != Pk.Exit.SUCCESS) {
9- release_task (update_task);
10- throw new GLib.IOError.FAILED (Pk.Exit.enum_to_string (results.get_exit_code ()));
11- }
12 } catch (Error e) {
13- release_task (update_task);
14 throw e;
15 } finally {
16 sc.uninhibit ();
17+ release_task (update_task);
18+ }
19+
20+ if (exit_status != Pk.Exit.SUCCESS) {
21+ throw new GLib.IOError.FAILED (Pk.Exit.enum_to_string (exit_status));
22+ } else {
23+ package.change_information.clear_update_info ();
24 }
25
26 yield refresh_updates ();
27- release_task (update_task);
28+
29 return exit_status;
30 }
31

Subscribers

People subscribed via source and target branches