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
=== modified file 'src/Core/Client.vala'
--- src/Core/Client.vala 2016-09-11 20:19:38 +0000
+++ src/Core/Client.vala 2016-09-17 13:56:59 +0000
@@ -160,19 +160,21 @@
160 sc.inhibit ();160 sc.inhibit ();
161 var results = yield update_task.update_packages_async (packages_ids, cancellable, cb);161 var results = yield update_task.update_packages_async (packages_ids, cancellable, cb);
162 exit_status = results.get_exit_code ();162 exit_status = results.get_exit_code ();
163 if (exit_status != Pk.Exit.SUCCESS) {
164 release_task (update_task);
165 throw new GLib.IOError.FAILED (Pk.Exit.enum_to_string (results.get_exit_code ()));
166 }
167 } catch (Error e) {163 } catch (Error e) {
168 release_task (update_task);
169 throw e;164 throw e;
170 } finally {165 } finally {
171 sc.uninhibit ();166 sc.uninhibit ();
167 release_task (update_task);
168 }
169
170 if (exit_status != Pk.Exit.SUCCESS) {
171 throw new GLib.IOError.FAILED (Pk.Exit.enum_to_string (exit_status));
172 } else {
173 package.change_information.clear_update_info ();
172 }174 }
173175
174 yield refresh_updates ();176 yield refresh_updates ();
175 release_task (update_task);177
176 return exit_status;178 return exit_status;
177 }179 }
178180

Subscribers

People subscribed via source and target branches