Bug 1411432 - doc: Expected order of actions not documented for dnf.callback.TransactionProgress
doc: Expected order of actions not documented for dnf.callback.TransactionPro...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
26
All Linux
medium Severity low
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
: Documentation, EasyFix, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-09 12:22 EST by Martin Kolman
Modified: 2017-04-01 13:22 EDT (History)
5 users (show)

See Also:
Fixed In Version: dnf-2.2.0-1.fc26
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-04-01 13:22:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Kolman 2017-01-09 12:22:44 EST
Description of problem:
The progress() method of the TransactionProgress class works with a number of "action" constants:
http://dnf.readthedocs.io/en/latest/api_callback.html#dnf.callback.TransactionProgress.progress

As the action constants correspond to events that might happen during a transaction it can be expected that that also the constants (or at least some of them) can only show up in some order. Eq. PKG_INSTALL for a package will always show up before PKG_VERIFY, TRANS_POST shows up at the very end, etc.

But the action/constant order is currently not documented, which might complicate usage of this API.



Version-Release number of selected component (if applicable):
Read the docs: Revision e5d2e280.

How reproducible:
always

Steps to Reproduce:
1. go to the DNF callback documentation: http://dnf.readthedocs.io/en/latest/api_callback.html#dnf.callback.TransactionProgress.progress
2. try to find out the order of the action constants

Actual results:
The order of the action constants is currently not documented.

Expected results:
The order of the action constants is documented, so API users can make current assumptions when writing their code.
Comment 1 Martin Kolman 2017-01-09 12:23:29 EST
A small typo in the description: "users can make *cprrect* assumptions when writing their code."
Comment 2 Martin Kolman 2017-01-09 12:24:13 EST
(In reply to Martin Kolman from comment #1)
> A small typo in the description: "users can make *cprrect* assumptions when
> writing their code."

*correct* :P
Comment 3 Honza Silhan 2017-01-09 12:26:37 EST
We will improve the doc. It should be done together with bug 1411423.
Comment 4 Honza Silhan 2017-01-16 07:20:32 EST
we should revert dnf commit which removes RPM callbacks.
Comment 5 Fedora End Of Life 2017-02-28 05:54:54 EST
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.
Comment 6 Jaroslav Mracek 2017-03-17 09:26:28 EDT
I tried to fulfill your request. Here is pull request: https://github.com/rpm-software-management/dnf/pull/763.
Comment 7 Fedora Update System 2017-03-27 15:21:11 EDT
dnf-2.2.0-1.fc26, libdnf-0.8.0-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-65586fa42b
Comment 8 Fedora Update System 2017-04-01 13:22:27 EDT
dnf-2.2.0-1.fc26, libdnf-0.8.0-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.