-
Notifications
You must be signed in to change notification settings - Fork 78
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
daemon: D-Bus API to cancel current transaction #1665
Conversation
Instead of hard coded constants use enum as callbacks return values.
41f5a93
to
274f7cb
Compare
New API `Goal.cancel()` cancels the transaction that was initiated by `do_transaction()`. The transaction can only be canceled during the package download phase. Once the RPM transaction has begun, cancellation is no longer permitted.
274f7cb
to
aec787f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The workflow for the entire cancel operation is clearly understood from the code. Thanks!
--> | ||
<method name="cancel"> | ||
<arg name="success" type="b" /> | ||
<arg name="error_msg" type="s" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set direction="out"
for both of these, please. The default, when not set, is the arguments are input arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened #1679 for this (the change is part of it)
…::cancel method Both the arguments are output arguments, to be read by client, not to be set by the client, thus mark them as such. Related to rpm-software-management#1665 (comment)
…::cancel method Both the arguments are output arguments, to be read by client, not to be set by the client, thus mark them as such. Related to rpm-software-management#1665 (comment)
…::cancel method Both the arguments are output arguments, to be read by client, not to be set by the client, thus mark them as such. Related to #1665 (comment)
Resolves: #1660
Changes:
41f5a93 (Marek Blaha, 38 minutes ago)
dnfdaemon: API to cancel running Goal.do_transaction()
During the download phase, calling Goal.cancel() will cause all downloads
to abort and transaction will not be performed. Once the rpm transaction is
started, the cancel is not any more allowed and rpm transaction will
finish.
b8e03b2 (Marek Blaha, 39 minutes ago)
DownloadCallbacks: Enum for possible return codes
Instead of hard coded constants use enum as callbacks return values.