Bug 1981530

Summary: [abrt] dnf: _revert_transaction(): history.py:233:_revert_transaction:KeyError: 'Reason Change'
Product: [Fedora] Fedora Reporter: Mihai Harpau <mihai>
Component: dnfAssignee: rpm-software-management
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 34CC: dmach, jmracek, jrohel, mblaha, mhatina, packaging-team-maint, pkratoch, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/1f8405faab5e7513504f0e3c0efe5106da368ff3
Whiteboard: abrt_hash:f478f4211d9e2ac868426f469f1e0a61d7c074d1;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-13 05:35:01 UTC Type: ---
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 Flags
File: _var_log_dnf.log
none
File: backtrace
none
File: cpuinfo
none
File: dnf-makecache.log
none
File: environ
none
File: mountinfo
none
File: namespaces
none
File: open_fds none

Description Mihai Harpau 2021-07-12 18:18:19 UTC
Version-Release number of selected component:
dnf-4.8.0-1.fc34

Additional info:
reporter:       libreport-2.15.2
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-af45372a-d12d-49f9-b9a8-318c65aaf031.scope
cmdline:        /usr/bin/python3 /usr/bin/dnf history undo 97
crash_function: _revert_transaction
exception_type: KeyError
executable:     /usr/bin/dnf
interpreter:    python3-3.9.6-1.fc34.x86_64
kernel:         5.12.14-300.fc34.x86_64
runlevel:       N 5
type:           Python3
uid:            0

Truncated backtrace:
history.py:233:_revert_transaction:KeyError: 'Reason Change'

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.9/site-packages/dnf/cli/main.py", line 201, in user_main
    errcode = main(args)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 67, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 106, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 122, in cli_run
    cli.run()
  File "/usr/lib/python3.9/site-packages/dnf/cli/cli.py", line 1055, in run
    return self.command.run()
  File "/usr/lib/python3.9/site-packages/dnf/cli/commands/history.py", line 342, in run
    self._hcmd_undo(tids)
  File "/usr/lib/python3.9/site-packages/dnf/cli/commands/history.py", line 190, in _hcmd_undo
    self._revert_transaction(old)
  File "/usr/lib/python3.9/site-packages/dnf/cli/commands/history.py", line 233, in _revert_transaction
    ti["action"] = action_map[ti["action"]]
KeyError: 'Reason Change'

Local variables in innermost frame:
self: <dnf.cli.commands.history.HistoryCommand object at 0x7f23e433ea90>
trans: <dnf.db.history.TransactionWrapper object at 0x7f23e4027520>
action_map: {'Install': 'Removed', 'Removed': 'Install', 'Upgrade': 'Downgraded', 'Upgraded': 'Downgrade', 'Downgrade': 'Upgraded', 'Downgraded': 'Upgrade', 'Reinstalled': 'Reinstall', 'Reinstall': 'Reinstalled', 'Obsoleted': 'Install', 'Obsolete': 'Obsoleted'}
data: {'version': '0.0', 'rpms': [{'action': 'Removed', 'nevra': 'kernel-5.13.1-300.fc34.x86_64', 'reason': 'unknown', 'repo_id': '@commandline'}, {'action': 'Removed', 'nevra': 'kernel-core-5.13.1-300.fc34.x86_64', 'reason': 'unknown', 'repo_id': '@commandline'}, {'action': 'Removed', 'nevra': 'kernel-modules-5.13.1-300.fc34.x86_64', 'reason': 'unknown', 'repo_id': '@commandline'}, {'action': 'Removed', 'nevra': 'kernel-modules-extra-5.13.1-300.fc34.x86_64', 'reason': 'unknown', 'repo_id': '@commandline'}, {'action': 'Reason Change', 'nevra': '1password-8.1.1-1.x86_64', 'reason': 'user', 'repo_id': '1password'}, {'action': 'Removed', 'nevra': 'kernel-5.12.9-300.fc34.x86_64', 'reason': 'user', 'repo_id': '@System'}, {'action': 'Removed', 'nevra': 'kernel-core-5.12.9-300.fc34.x86_64', 'reason': 'user', 'repo_id': '@System'}, {'action': 'Removed', 'nevra': 'kernel-modules-5.12.9-300.fc34.x86_64', 'reason': 'user', 'repo_id': '@System'}, {'action': 'Removed', 'nevra': 'kernel-modules-extra-5.12.9-300.fc34.x86_64', 'reason': 'user', 'repo_id': '@System'}]}
content_type: 'rpms'
ti: {'action': 'Reason Change', 'nevra': '1password-8.1.1-1.x86_64', 'reason': 'user', 'repo_id': '1password'}

Potential duplicate: bug 1966550

Comment 1 Mihai Harpau 2021-07-12 18:18:24 UTC
Created attachment 1800918 [details]
File: _var_log_dnf.log

Comment 2 Mihai Harpau 2021-07-12 18:18:26 UTC
Created attachment 1800919 [details]
File: backtrace

Comment 3 Mihai Harpau 2021-07-12 18:18:27 UTC
Created attachment 1800920 [details]
File: cpuinfo

Comment 4 Mihai Harpau 2021-07-12 18:18:29 UTC
Created attachment 1800921 [details]
File: dnf-makecache.log

Comment 5 Mihai Harpau 2021-07-12 18:18:31 UTC
Created attachment 1800922 [details]
File: environ

Comment 6 Mihai Harpau 2021-07-12 18:18:32 UTC
Created attachment 1800923 [details]
File: mountinfo

Comment 7 Mihai Harpau 2021-07-12 18:18:34 UTC
Created attachment 1800924 [details]
File: namespaces

Comment 8 Mihai Harpau 2021-07-12 18:18:35 UTC
Created attachment 1800925 [details]
File: open_fds

Comment 9 Pavla Kratochvilova 2021-07-13 05:35:01 UTC

*** This bug has been marked as a duplicate of bug 1966550 ***