Description of problem: During a Fedora installation the Anaconda installer runs a DNF transaction that usually contains a couple hundred package and sometimes much more. In such a case the part of the transaction where DNF runs package scriptlets is quite long, in some cases even longer that the package installation phase. But unfortunately unlike the package installation phase there is currently no interface for monitoring the "scriptlet-phase" of the transaction. So for now the the user is stuck with a generic "processing post installation setup tasks" message instead of more informative progress reporting ("configuring package foo (115/558)"). This would be also help if the transaction gets stuck on a broken scriptlet - it would be much easier to find which package is at fault. Anaconda uses the dnf.callback.TransactionProgress class for package installation progress monitoring. The TransactionProgress class defines a number of constants that identify individual actions that might happen during the DNF transaction (PKG_INSTALL, PKG_CLEANUP, PKG_VERIFY, etc.). It looks like it should be possible to add another a action constants, say PKG_SCRIPTLET or PKG_RUN_SCRIPTLET (or similar) that would be triggered what a scriptlet for a package is started. This could then be used by Anaconda (and likely also by others) to provide progress reporting for the scriptlet phase of the DNF transaction. A couple of things to note: - this is only about number of scriptlets run/total number of scriptlets to run style progress reporting, not detailed progress reporting for individual scriptlets - what should be the value of the ti_done & ti_total arguments for the progress() method for a scritplet-running action ?
we should revert dnf commit which removes RPM callbacks.
I tried to fulfill your request. Here is pull request: https://github.com/rpm-software-management/dnf/pull/763. Please can you provide a feedback if the patch is exactly what you requested? Thanks a lot
(In reply to Jaroslav Mracek from comment #2) > I tried to fulfill your request. Here is pull request: > https://github.com/rpm-software-management/dnf/pull/763. Please can you > provide a feedback if the patch is exactly what you requested? Thanks a lot Thanks a lot! :) I'll check it out and let you know.
I tried to fulfill your request. Here is pull request: https://github.com/rpm-software-management/dnf/pull/763.
I've managed to setup a testing environment (had to add python3-gpg & gpgme to the installation environment) and I'm currently testing the patch & checking the API provides what Anaconda needs to correctly report scriptlets being processed.
Seems fine so far! I've noted my detailed findings in the PR: https://github.com/rpm-software-management/dnf/pull/763#issuecomment-288205671
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
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.