Bug 1845800

Summary: History info tracebacks when group is upgraded/downgraded
Product: [Fedora] Fedora Reporter: Pavla Kratochvilova <pkratoch>
Component: dnfAssignee: Lukáš Hrázký <lhrazky>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 31CC: dmach, jmracek, jrohel, lhrazky, mblaha, mhatina, packaging-team-maint, pkratoch, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.4.0-1.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-18 15:49:18 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 Pavla Kratochvilova 2020-06-10 06:02:14 UTC
Description of problem:
When transaction contains upgrade/downgrade operation of a group and it's not the first operation, dnf history info <id> ends with the following traceback:

  File "/usr/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 201, in user_main
    errcode = main(args)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 67, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 106, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.7/site-packages/dnf/cli/main.py", line 122, in cli_run
    cli.run()
  File "/usr/lib/python3.7/site-packages/dnf/cli/cli.py", line 1162, in run
    return self.command.run()
  File "/usr/lib/python3.7/site-packages/dnf/cli/commands/__init__.py", line 1017, in run
    self.merged_transaction_ids)
  File "/usr/lib/python3.7/site-packages/dnf/cli/output.py", line 1746, in historyInfoCmd
    self._historyInfoCmd(trans, pats)
  File "/usr/lib/python3.7/site-packages/dnf/cli/output.py", line 1900, in _historyInfoCmd
    self.historyInfoCmdPkgsAltered(old, pats)
  File "/usr/lib/python3.7/site-packages/dnf/cli/output.py", line 1973, in historyInfoCmdPkgsAltered
    last.name == pkg.name and pkg.action == libdnf.transaction.TransactionItemAction_UPGRADE):
  File "/usr/lib/python3.7/site-packages/dnf/db/history.py", line 57, in name
    return self._item.getRPMItem().getName()
AttributeError: 'NoneType' object has no attribute 'getName'


Version-Release number of selected component (if applicable):
dnf-4.2.21-1.fc31.noarch


How reproducible:
Deterministic.


Steps to Reproduce:
1. dnf --repo=testingrepo install dummy @Group
2. dnf --repo=updatesrepo upgrade dummy @Group
3. dnf history info last


Actual results:
Traceback.


Expected results:
Full transaction info.

Comment 2 Fedora Update System 2020-10-08 11:59:32 UTC
FEDORA-2020-b40fc174b5 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b40fc174b5

Comment 3 Fedora Update System 2020-10-08 12:00:28 UTC
FEDORA-2020-5d9f0ce2b3 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-5d9f0ce2b3

Comment 4 Fedora Update System 2020-10-08 22:19:45 UTC
FEDORA-2020-b40fc174b5 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-b40fc174b5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b40fc174b5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2020-10-12 21:15:57 UTC
FEDORA-2020-b40fc174b5 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b40fc174b5

Comment 6 Fedora Update System 2020-10-12 21:23:33 UTC
FEDORA-2020-5d9f0ce2b3 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-5d9f0ce2b3

Comment 7 Fedora Update System 2020-10-12 22:45:16 UTC
FEDORA-2020-b40fc174b5 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-b40fc174b5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b40fc174b5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2020-10-13 20:18:13 UTC
FEDORA-2020-5d9f0ce2b3 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-5d9f0ce2b3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-5d9f0ce2b3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2020-10-18 15:49:18 UTC
FEDORA-2020-5d9f0ce2b3 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2020-10-19 16:53:34 UTC
FEDORA-2020-b40fc174b5 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-b40fc174b5

Comment 11 Fedora Update System 2020-10-20 14:22:50 UTC
FEDORA-2020-b40fc174b5 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-b40fc174b5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-b40fc174b5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2020-10-27 01:20:49 UTC
FEDORA-2020-b40fc174b5 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.