-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dnf5daemon-server: Add D-Bus API to cancel ongoing transaction #1660
Comments
I just verified that even if I close the session the goal is still running on the daemon side (the daemon is emitting D-Bus signals for non-existent dnf5 session). |
I don't know the D-Bus API, but reading your description, I find counterintuitive that There should be a separate phase for downloading the packages and a separate phase for executing the RPM transaction. Providing a way for canceling the download phase, you request, is reasonable. However, cancelling the RPM transaction is probably impossible. It depends on whether librpm supports it. And provided the transaction involves scriptlets with side effects, I believe it's unreasonable to try cancelling a running RPM transaction. |
Regarding the daemon continuing in transaction after loosing a session, that's a feature. |
For gnome-software, the install/uninstall are done immediately, the update/upgrade are done offline. I do not see a problem in the I agree not every phase can be cancelled, but it's not my decision, but yours/rpm's what can and what cannot be cancelled. If the hypothetical new |
I've quickly checked the daemon sources and cancelling the transaction during the download phase should be relatively easy to implement. |
Calling any larger operation can take its time. For example the system upgrade can download multiple gigabytes of data, which the user (on the client side) might want to cancel and repeat later. Cancelling the
org.rpm.dnf.v0.Goal::do_transaction()
call itself on the client side does not help, the daemon continues with its duty. I did not try what the daemon does when I'd close the session in the middle of the transaction run, but that would be against session reuse (#1653).I did not find a
cancel()
method, which I'd expect on theorg.rpm.dnf.v0.Goal
interface. The only one I found is theorg.rpm.dnf.v0.Offline::cancel()
, but it's not for generic goals/transactions.Could you add a D-Bus API to cancel an ongoing transaction/goal within an opened session, please?
The text was updated successfully, but these errors were encountered: