Improvements in installation or updates for flatpak backend
ClosedPublic

Authored by jgrulich on Jun 20 2017, 1:07 PM.

Details

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

Diff Detail

Repository
R134 Discover Software Store
Branch
Plasma/5.10
Lint
No Linters Available
Unit
No Unit Test Coverage
jgrulich created this revision.Jun 20 2017, 1:07 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 20 2017, 1:07 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
apol edited edge metadata.Jun 20 2017, 1:35 PM

All in all, it looks good to me, much better than the previous approach. Thanks!

libdiscover/Transaction/Transaction.h
65

FailedStatus?

apol accepted this revision.Jun 20 2017, 1:35 PM
This revision is now accepted and ready to land.Jun 20 2017, 1:35 PM
This revision was automatically updated to reflect the committed changes.