pkg icon indicating copy to clipboard operation
pkg copied to clipboard

Support for job cancellation

Open arrowd opened this issue 1 year ago • 6 comments

After libpkg enters pkg_jobs_solve()/pkg_jobs_apply() there is no way to signal it to stop. It'd be great to be able to stop the process while reacting on PKG_EVENT_PROGRESS_START/PKG_EVENT_PROGRESS_TICK.

arrowd avatar May 02 '23 11:05 arrowd

What are you trying to achieve, the problem is in the middle of a transaction, the risk is to stop in an unstable state.

bapt avatar May 02 '23 12:05 bapt

PackageKit has the ability to cancel jobs and I want our backend to support it as much as it can. At least we should be able to cancel during downloading.

pkg also stops in the middle of jobs_apply when a trigger fails, as well as user can hit Ctrl+C any time, so we're already risking. Adding some cancellation points may mitigate these risks.

arrowd avatar May 02 '23 12:05 arrowd

ok I see and pkg tries to remain in a stable state as possible. I'll see what I can do

bapt avatar May 02 '23 12:05 bapt

Another case - cancelling during multiple packages removal after receiving PKG_EVENT_DEINSTALL_FINISHED.

arrowd avatar May 06 '23 10:05 arrowd

Duplicate of a 2021 issue?

  • #1956

grahamperrin avatar Dec 07 '23 01:12 grahamperrin

I think this can be closed now.

arrowd avatar Dec 07 '23 05:12 arrowd