Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1656801

Summary: `dnf update`: "Errors occurred during transaction" due to POSTUN scriptlet failures
Product: Red Hat Enterprise Linux 8 Reporter: Kashyap Chamarthy <kchamart>
Component: dnfAssignee: Pavla Kratochvilova <pkratoch>
Status: CLOSED ERRATA QA Contact: Karel Srot <ksrot>
Severity: unspecified Docs Contact:
Priority: low    
Version: 8.0CC: dmach, james.antill, ksrot, pkratoch
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.2.7-3.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 22:20:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1681084    
Bug Blocks:    
Attachments:
Description Flags
dnf.log
none
dnf.rpm.log none

Description Kashyap Chamarthy 2018-12-06 11:13:20 UTC
Running `dnf update` on a RHEL-8 guest (installed from the 
'nightly-1590', built on 07SEP2018) results in the transaction itself
succeeding, but throws: "Errors occurred during transaction" on the
shell.

From the /var/log/dnf.log (full log in the attachment):

    [...]
    2018-12-06T09:39:58Z SUBDEBUG
    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
        return _main(base, args, cli_class, option_parser_class)
      File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
        return cli_run(cli, base)
      File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 123, in cli_run
        ret = resolving(cli, base)
      File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 154, in resolving
        base.do_transaction(display=displays)
      File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 249, in do_transaction
        for tsi in trans:
    dnf.exceptions.Error: Transaction failed
    2018-12-06T09:39:58Z CRITICAL Error: Transaction failed
    [...]

And from the /var/log/dnf.rpm.log (full log in the attachment):

    [...]
    2018-12-06T09:37:05Z ERROR Error in POSTUN scriptlet in rpm package bind-export-libs
    2018-12-06T09:37:05Z ERROR Error in POSTUN scriptlet in rpm package bind-export-libs
    [...]

When I say "transaction itself succeeded, I mean the subsequent runs of 
`dnf clean all` && `dnf update` do _not_ result in any failures.

So there doesn't seem to be any real underlying error.  But talking to
Jaroslav Mracek on IRC, he says that the exception is being raised in 
the incorrect place, and suggested to file this bug.

Comment 1 Kashyap Chamarthy 2018-12-06 11:17:01 UTC
Created attachment 1512054 [details]
dnf.log

Comment 2 Kashyap Chamarthy 2018-12-06 11:17:33 UTC
Created attachment 1512055 [details]
dnf.rpm.log

Comment 4 Jaroslav Mracek 2018-12-10 08:33:46 UTC
Additionally there is in dnf.rpm.log:
2018-12-06T09:36:17Z ERROR Error unpacking rpm package yum-4.0.9-1.el8.noarch
2018-12-06T09:36:17Z ERROR Error unpacking rpm package yum-4.0.9-1.el8.noarch

Comment 6 Pavla Kratochvilova 2019-06-27 08:31:17 UTC
I believe the problem in this case is that the transaction appears as successful (exits with 0) even when it actually failed. It should be already fixed in upstream by commit: https://github.com/rpm-software-management/dnf/commit/94a074b9747a437c478e388dc76ed90d06d8a666

Comment 16 errata-xmlrpc 2019-11-05 22:20:50 UTC
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, 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/RHSA-2019:3583

Comment 17 Red Hat Bugzilla 2023-09-14 04:43:26 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days