+++ This bug was initially created as a clone of Bug #1788212 +++
Description of problem:
When installing a rpm package via the DNF Python API, the preinstall/postinstall script outputs are not logged to /var/log/dnf.rpm.log as they are via the command line.
Version-Release number of selected component (if applicable):
dnf-4.2.17-6.el8
How reproducible:
Always
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (dnf bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2021:1657