Abort transaction on PK dependency resolution error
ClosedPublic

Authored by arojas on May 25 2018, 5:44 PM.

Details

Summary

If PackageKit throws a dependency resolution error, abort the transaction instead of finishing it anyway (potentially breaking the user's installation). This is far from ideal, but prevents Discover from performing destructive operations while the PackageKit issues are fixed

BUG: 394327

Test Plan

Tried to remove a package which is an optional dependency of another one on Arch (which gives a warning that PK can't handle), the operation was aborted.

Diff Detail

Repository
R134 Discover Software Store
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
arojas created this revision.May 25 2018, 5:44 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 25 2018, 5:44 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
arojas requested review of this revision.May 25 2018, 5:44 PM
apol added a comment.May 25 2018, 6:52 PM

Looks like it's missing checking the exit argument in ::cleanup() for ExitFailed no? Can you check if in this case we're getting the an ExitFailed? If so the setStatus should go there.

apol requested changes to this revision.May 25 2018, 6:52 PM
This revision now requires changes to proceed.May 25 2018, 6:52 PM
arojas updated this revision to Diff 34881.May 25 2018, 7:22 PM

Check for ExitStatus in cleanup() and move setStatus there

arojas updated this revision to Diff 34886.May 25 2018, 9:48 PM

Remove wrong check for !m_proceedFunctions.isEmpty()

apol accepted this revision.May 25 2018, 11:09 PM

Looks better, thanks!

This revision is now accepted and ready to land.May 25 2018, 11:09 PM
This revision was automatically updated to reflect the committed changes.