Bug 1411432 - doc: Expected order of actions not documented for dnf.callback.TransactionProgress
Summary: doc: Expected order of actions not documented for dnf.callback.TransactionPro...
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
(Show other bugs)
Version: 26
Hardware: All Linux
medium
low
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Documentation, EasyFix, Triaged
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-09 17:22 UTC by Martin Kolman
Modified: 2017-04-01 17:22 UTC (History)
5 users (show)

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 17:22:27 UTC
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 1411423 None None None Never

Description Martin Kolman 2017-01-09 17:22:44 UTC
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 17:23:29 UTC
A small typo in the description: "users can make *cprrect* assumptions when writing their code."

Comment 2 Martin Kolman 2017-01-09 17:24:13 UTC
(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 17:26:37 UTC
We will improve the doc. It should be done together with bug 1411423.

Comment 4 Honza Silhan 2017-01-16 12:20:32 UTC
we should revert dnf commit which removes RPM callbacks.

Comment 5 Fedora End Of Life 2017-02-28 10:54:54 UTC
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 13:26:28 UTC
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 19:21:11 UTC
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 17:22:27 UTC
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.