Abort transaction on PK dependency resolution error
ClosedPublic

Authored by arojas on Fri, May 25, 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.Fri, May 25, 5:44 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFri, May 25, 5:44 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
arojas requested review of this revision.Fri, May 25, 5:44 PM
apol added a comment.Fri, May 25, 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.Fri, May 25, 6:52 PM
This revision now requires changes to proceed.Fri, May 25, 6:52 PM
arojas updated this revision to Diff 34881.Fri, May 25, 7:22 PM

Check for ExitStatus in cleanup() and move setStatus there

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

Remove wrong check for !m_proceedFunctions.isEmpty()

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

Looks better, thanks!

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