Bug 1598590
Summary: | dnf RuntimeError: C++ std::exception: Step: UNIQUE constraint failed | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Vinson Lee <vlee> | ||||
Component: | dnf | Assignee: | rpm-software-management | ||||
Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 29 | CC: | awilliam, dmach, mblaha, mhatina, packaging-team-maint, prd-fedora, robatino, rpm-software-management, samuel.rakitnican, samuel-rhbugs, vmukhame | ||||
Target Milestone: | --- | Keywords: | Triaged | ||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-09-14 19:12:29 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: | |||||||
Attachments: |
|
Description
Vinson Lee
2018-07-05 22:12:27 UTC
In my case the bug is triggered with 'install' dnf command since there are no new upgrades available. dnf-3.0.2-1.fc29.noarch Traceback (most recent call last): File "/bin/dnf", line 58, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 179, in user_main errcode = main(args) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 64, in main return _main(base, args, cli_class, option_parser_class) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 99, in _main return cli_run(cli, base) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 123, in cli_run ret = resolving(cli, base) File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 146, in resolving base.resolve(cli.demands.allow_erasing) File "/usr/lib/python3.7/site-packages/dnf/base.py", line 817, in resolve self._transaction = self._goal2transaction(goal) File "/usr/lib/python3.7/site-packages/dnf/base.py", line 725, in _goal2transaction ts.add_install(pkg, obs, reason) File "/usr/lib/python3.7/site-packages/dnf/db/group.py", line 256, in add_install ti_new = self.new(new, libdnf.transaction.TransactionItemAction_INSTALL, reason) File "/usr/lib/python3.7/site-packages/dnf/db/group.py", line 219, in new rpm_item = self._pkg_to_swdb_rpm_item(pkg) File "/usr/lib/python3.7/site-packages/dnf/db/group.py", line 210, in _pkg_to_swdb_rpm_item rpm_item = self.history.swdb.createRPMItem() File "/usr/lib/python3.7/site-packages/dnf/db/history.py", line 290, in swdb self._swdb = libdnf.transaction.Swdb(self.dbpath) File "/usr/lib64/python3.7/site-packages/libdnf/transaction.py", line 713, in __init__ this = _transaction.new_Swdb(*args) RuntimeError: C++ std::exception: Step: UNIQUE constraint failed: comps_environment_group.environment_id, comps_environment_group.groupid in INSERT INTO comps_environment_group ( environment_id, groupid, installed, group_type ) VALUES (4392, 'fonts', 1, 4) Tried upgrading to 3.0.3 from koji: https://koji.fedoraproject.org/koji/buildinfo?buildID=1105289 But the issue persists. Any other step necessary? Asked on fedora-devel, and apparently it is not a common issue. Removing the old history DB[1] makes it work again. [1] https://lists.fedoraproject.org/archives/list/test@lists.fedoraproject.org/message/YORASOA6X7BT3Y5743344O5NFDQVBOJS/ Created attachment 1458556 [details]
History DB on which dnf 3 fails.
Also `dnf --installroot` from an old Fedora release works fine on that history DB.
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle. Changing version to '29'. *** This bug has been marked as a duplicate of bug 1596827 *** dnf-3.6.1 works with attached history. |