Bug 1545075
Summary: | updateinfo tracebacks when an advisory consists of multiple repos | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Eva Mrakova <emrakova> |
Component: | dnf | Assignee: | Marek Blaha <mblaha> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 27 | CC: | alexander, bugzilla, dmach, fatkasuvayu, flydove, hx, jmracek, l1e9w76, liebundartig, lpancescu, mhatina, mszpak, packaging-team-maint, redhat-bugzilla, rpm-software-management, sajjaddns, skontar, stefanmurariu, vmukhame |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-06-28 08:23:11 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
Eva Mrakova
2018-02-14 08:40:09 UTC
I get what appears to be the same stack trace (just with a KeyError for None) right now, in Fedora 27, with the default repos - I didn't create any repo files like Eva did: # dnf updateinfo list Fedora 27 - x86_64 - Updates 3.7 MB/s | 19 MB 00:05 Last metadata expiration check: 0:00:38 ago on Wed 21 Feb 2018 06:21:32 PM CET. 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.6/site-packages/dnf/cli/main.py", line 179, in user_main errcode = main(args) 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 115, in cli_run cli.run() File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1014, in run return self.command.run() File "/usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py", line 417, in run display(apkg_adv_insts, mixed, description) File "/usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py", line 292, in display_list for (nevra, inst), id2type in cls._list(apkg_adv_insts)) File "/usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py", line 292, in <genexpr> for (nevra, inst), id2type in cls._list(apkg_adv_insts)) File "/usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py", line 290, in <genexpr> for id_, (typ, sev) in id2type.items()), File "/usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py", line 283, in type2label return (cls.SECURITY2LABEL[sev] if typ == hawkey.ADVISORY_SECURITY KeyError: 'None' changing line 56 from None: _('Unknown/Sec.')}#fixed by AKB, 2018-02-22 to 'None': _('Unknown/Sec.')}#fixed by AKB, 2018-02-22 seems to fix the problem sorry, line 56 in updateinfo.py *** Bug 1548684 has been marked as a duplicate of this bug. *** *** Bug 1548788 has been marked as a duplicate of this bug. *** *** Bug 1550491 has been marked as a duplicate of this bug. *** Applying fix in comment 2 works and I see the fix in comment 6 is even better, but it begs the question as to what might be preventing a fixed package from being built? Obviously others are reporting this issue, so it would be nice to have a fix sooner than later. Many thanks! This problem can be reproduced in Fedora 26 x86_64 and Fedora 28 x86_64 with default repositories: $ rpm -q dnf dnf-2.7.5-8.fc28.noarch # on Fedora 26: dnf-2.7.5-2.fc26.noarch $ dnf repolist ... repo id repo name status *fedora Fedora 28 - x86_64 57,057 *updates Fedora 28 - x86_64 - Updates 0 *updates-testing Fedora 28 - x86_64 - Test Updates 4,808 On Fedora 28 these commands work without problems: dnf updateinfo dnf updateinfo --bugfix dnf updateinfo --security dnf updateinfo --summary dnf updateinfo --info these commands throw the same stack trace: dnf updateinfo list updates dnf updateinfo --list dnf updateinfo --list available dnf updateinfo --list all dnf updateinfo --list installed dnf updateinfo --list updates dnf updateinfo --list available security dnf updateinfo --list all security dnf updateinfo --list installed security dnf updateinfo --list updates security the stack trace is (in Fedora 26 only one difference: the string 'line 1016' is changed to 'line 1014'): Traceback (most recent call last): File "/usr/bin/dnf", line 58, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 179, in user_main errcode = main(args) 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 115, in cli_run cli.run() File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1016, in run return self.command.run() File "/usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py", line 417, in run display(apkg_adv_insts, mixed, description) File "/usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py", line 292, in display_list for (nevra, inst), id2type in cls._list(apkg_adv_insts)) File "/usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py", line 292, in <genexpr> for (nevra, inst), id2type in cls._list(apkg_adv_insts)) File "/usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py", line 290, in <genexpr> for id_, (typ, sev) in id2type.items()), File "/usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py", line 283, in type2label return (cls.SECURITY2LABEL[sev] if typ == hawkey.ADVISORY_SECURITY Applying the fix from comment 2 fixes problem in Fedora 26 and 28: vi /usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py change line 56 from: None: _('Unknown/Sec.')} to: 'None': _('Unknown/Sec.')} (In reply to Chris Schanzle from comment #8) Maybe a new upstream release? I submitted the patch from comment 2 to the dnf package for temporary inclusion: https://src.fedoraproject.org/rpms/dnf/pull-request/7 *** Bug 1564363 has been marked as a duplicate of this bug. *** *** Bug 1566006 has been marked as a duplicate of this bug. *** *** Bug 1569745 has been marked as a duplicate of this bug. *** *** Bug 1575810 has been marked as a duplicate of this bug. *** *** Bug 1578953 has been marked as a duplicate of this bug. *** *** Bug 1585463 has been marked as a duplicate of this bug. *** The issue is solved by dnf-3.0.1-1 that was released into rawhide. |