Improvements in installation or updates for flatpak backend

Authored by jgrulich on Jun 20 2017, 12:59 PM.

Description

Improvements in installation or updates for flatpak backend

Summary:
I've made few improvements which should help and make installation or update
process with flatpak backend a bit better experience:

  1. Properly cancel flatpak transactions, it now calls proper g_cancellable to cancel running transactions in FlatpakTransactionJob
  1. Pass FlatpakTransaction as a parent of FlatpakTransactionJob so it gets deleted together with parent
  1. Make difference between finished transaction, whether it finished successfuly or finished with an error, with this when we finish a flatpak transaction we can update app metadata accordingly, because when the transaction fails, we shouldn't do that, because failed updates will be marked as installed instead of updatable and the user would think that the app has been updated even though they see an error
  1. When installing an application which don't have required runtime installed we should care only about state of the application and not of the runtime. I.e imagine installing application requiring a runtime, it will start downloading both together, the app will be installed first and waiting for runtime to finish, but when the installation of runtime fails, we call transactionFinished(false) and that would cause the app marked as not installed, while only runtime failed, also we would set transaction status to DoneWithError status also ending up with up not being updated in FlatpakBackend

Reviewers: apol

Reviewed By: apol

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D6298