Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1647144

Summary: "TransactionItem state is not set" / "TransactionItem not found for key" error when RPM db contains duplicate entries for a package
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 29CC: dmach, mblaha, mhatina, packaging-team-maint, rpm-software-management, vmukhame, zbyszek
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: dnf-4.0.9-1.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-05 02:33:46 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:

Description Adam Williamson 2018-11-06 18:18:50 UTC
Zbigniew and I have both reported cases of "TransactionItem not found for key" or "TransactionItem state is not set" errors in two other bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1627534#c1 (Zbigniew)
https://bugzilla.redhat.com/show_bug.cgi?id=1642796#c19 (me)

which turned out to be not the same as the other reports in those bugs, but a distinct case: this error can occur if the RPM database has multiple entries for a package when a transaction involving that package is run, as can be the case if a *previous* transaction went wrong somehow. So if you update from foo-1.0 to foo-2.0, only that transaction fails early and the RPM db winds up still having both 'foo-1.0' and 'foo-2.0' entries, then when you go to update to 'foo-3.0', the transaction may end with one of these errors.

Per https://bugzilla.redhat.com/show_bug.cgi?id=1642796#c25 , jmracek has written a fix for this case:
https://github.com/rpm-software-management/dnf/pull/1260

Comment 1 Fedora Update System 2018-11-22 18:57:07 UTC
libdnf-0.22.3-1.fc29 dnf-4.0.9-1.fc29 dnf-plugins-core-4.0.2-1.fc29 dnf-plugins-extras-4.0.0-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-17cbc3c616

Comment 2 Fedora Update System 2018-11-23 02:56:40 UTC
dnf-4.0.9-1.fc29, dnf-plugins-core-4.0.2-1.fc29, dnf-plugins-extras-4.0.0-1.fc29, libdnf-0.22.3-1.fc29 has been pushed to the Fedora 29 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-2018-17cbc3c616

Comment 3 Fedora Update System 2018-12-05 02:33:46 UTC
dnf-4.0.9-1.fc29, dnf-plugins-core-4.0.2-1.fc29, dnf-plugins-extras-4.0.0-1.fc29, libdnf-0.22.3-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.