Bug 1706098 - exception:when dnf history rollback id but not all
Summary: exception:when dnf history rollback id but not all
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 33
Hardware: x86_64
OS: Unspecified
medium
urgent
Target Milestone: ---
Assignee: Daniel Mach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-03 14:31 UTC by lyfbuaa
Modified: 2021-03-23 01:10 UTC (History)
8 users (show)

Fixed In Version: dnf-4.6.0-1.fc33 dnf-4.6.0-1.fc32
Clone Of:
Environment:
Last Closed: 2021-03-03 23:15:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description lyfbuaa 2019-05-03 14:31:21 UTC
Description of problem:

exception:when dnf history rollback id  but not allexception:when dnf history rollback id  but not all

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.shell cmd:  dnf history rollback id    ##but not all
2.g-io-error-quark: GDBus.Error:org.freedesktop.DBus.Python.AttributeError: Traceback (most recent call last):
  File "/usr/lib64/python3.7/site-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python3.7/site-packages/dnfdaemon/server/__init__.py", line 68, in newFunc
    rc = func(*args, **kwargs)
  File "/usr/share/dnfdaemon/dnfdaemon-system", line 291, in GetHistoryPackages
    value = self.get_history_transaction_pkgs(tid)
  File "/usr/lib/python3.7/site-packages/dnfdaemon/server/__init__.py", line 684, in get_history_transaction_pkgs
    pkg_id = self._get_id(pkg)
  File "/usr/lib/python3.7/site-packages/dnfdaemon/server/__init__.py", line 1017, in _get_id
    values = [pkg.name, str(pkg.epoch), pkg.version, pkg.release, pkg.arch]
  File "/usr/lib/python3.7/site-packages/dnf/db/history.py", line 56, in name
    return self._item.getRPMItem().getName()
AttributeError: 'NoneType' object has no attribute 'getName'

3.

Actual results:
g-io-error-quark: GDBus.Error:org.freedesktop.DBus.Python.AttributeError: Traceback (most recent call last):
  File "/usr/lib64/python3.7/site-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python3.7/site-packages/dnfdaemon/server/__init__.py", line 68, in newFunc
    rc = func(*args, **kwargs)
  File "/usr/share/dnfdaemon/dnfdaemon-system", line 291, in GetHistoryPackages
    value = self.get_history_transaction_pkgs(tid)
  File "/usr/lib/python3.7/site-packages/dnfdaemon/server/__init__.py", line 684, in get_history_transaction_pkgs
    pkg_id = self._get_id(pkg)
  File "/usr/lib/python3.7/site-packages/dnfdaemon/server/__init__.py", line 1017, in _get_id
    values = [pkg.name, str(pkg.epoch), pkg.version, pkg.release, pkg.arch]
  File "/usr/lib/python3.7/site-packages/dnf/db/history.py", line 56, in name
    return self._item.getRPMItem().getName()
AttributeError: 'NoneType' object has no attribute 'getName'

Expected results:
rollback dnf action

Additional info:

Comment 1 Jaroslav Mracek 2019-05-06 11:31:40 UTC
Please could you provide version of dnf, and libdnf?

Comment 2 lyfbuaa 2019-05-06 13:26:12 UTC
dnf --version
4.2.2
  已安装: dnf-0:4.2.2-2.fc30.noarch 在 2019年05月01日 星期三 10时14分21秒
  构建    :Fedora Project 在 2019年04月05日 星期五 11时32分21秒

  已安装: rpm-0:4.14.2.1-4.fc30.1.x86_64 在 2019年05月01日 星期三 09时49分52秒
  构建    :Fedora Project 在 2019年02月02日 星期六 18时46分11秒

Comment 3 lyfbuaa 2019-05-08 02:00:20 UTC
when on rollback id(dnf groupinstall ...)

Comment 4 Jaroslav Mracek 2019-08-05 08:24:55 UTC
From Traceback in Comment 0 it is possible to see that dnf was called from dnfdeamon. I suggest that the history undo was called from dnfdragora. The problem is that dnf still not provides API to work with history database.

Comment 5 Ben Cotton 2020-04-30 20:27:04 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Ben Cotton 2020-08-11 15:32:45 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 7 Daniel Mach 2021-01-12 07:27:06 UTC
The following changes should fix this bug, because they introduce comps support into dnf history.
Lack of this support most likely caused the crash.

change: https://github.com/rpm-software-management/dnf/pull/1689
tests: https://github.com/rpm-software-management/ci-dnf-stack/pull/916

Comment 8 Fedora Update System 2021-03-01 12:46:43 UTC
FEDORA-2021-4935120076 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-4935120076

Comment 9 Fedora Update System 2021-03-01 12:46:51 UTC
FEDORA-2021-be78216a31 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-be78216a31

Comment 10 Fedora Update System 2021-03-01 17:10:48 UTC
FEDORA-2021-be78216a31 has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-be78216a31`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-be78216a31

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

Comment 11 Fedora Update System 2021-03-01 17:46:02 UTC
FEDORA-2021-4935120076 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-4935120076`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-4935120076

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

Comment 12 Fedora Update System 2021-03-03 23:15:34 UTC
FEDORA-2021-4935120076 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2021-03-23 01:10:51 UTC
FEDORA-2021-be78216a31 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.