Bug 1136584

Summary: [abrt] dnf: rpmsack.py:255:_read:AttributeError: <dnf.yum.rpmsack.RPMDBAdditionalDataPackage object at 0x7f10fed01b50> has no attribute reason
Product: [Fedora] Fedora Reporter: Chris Murphy <bugzilla>
Component: dnfAssignee: Honza Silhan <jsilhan>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: high    
Version: 21CC: bugzilla, ignatenko, jsilhan, juan77.sonic, jzeleny, pnemade, RIKINET71, tim.lauridsen
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/9c1b75090c9f10939894a620a2c2234d6f2e3c55
Whiteboard: abrt_hash:18a17d1c037331d1a036b2b631f23fb548c2fbc2
Fixed In Version: dnf-0.6.2 dnf-0.6.4-7.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-13 06:53:00 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: backtrace
none
File: environ
none
yumdb.tar none

Description Chris Murphy 2014-09-02 23:50:55 UTC
Description of problem:
# dnf group install Virtualization
[snip]
Installed:
  libvirt-python.x86_64 1.2.7-2.fc21          python-ipaddr.noarch 2.1.10-2.fc21                 virt-install.noarch 1.0.1-3.fc21.1           virt-manager.noarch 1.0.1-3.fc21.1          virt-manager-common.noarch 1.0.1-3.fc21.1          virt-viewer.x86_64 1.0-2.fc21              
Complete!
Traceback (most recent call last):
-----

Version-Release number of selected component:
dnf-0.6.1-1.fc21

Additional info:
reporter:       libreport-2.2.3
cmdline:        /usr/bin/python -OO /usr/bin/dnf group install Virtualization
executable:     /usr/bin/dnf
kernel:         3.16.1-301.fc21.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
rpmsack.py:255:_read:AttributeError: <dnf.yum.rpmsack.RPMDBAdditionalDataPackage object at 0x7f10fed01b50> has no attribute reason

Traceback (most recent call last):
  File "/usr/bin/dnf", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 182, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 145, in _main
    cli.command.run_transaction()
  File "/usr/lib/python2.7/site-packages/dnf/cli/commands/group.py", line 460, in run_transaction
    db_pkg.reason = goal.group_reason(pkg, db_pkg.reason)
  File "/usr/lib/python2.7/site-packages/dnf/yum/rpmsack.py", line 291, in __getattr__
    return self._read(attr)
  File "/usr/lib/python2.7/site-packages/dnf/yum/rpmsack.py", line 255, in _read
    raise AttributeError("%s has no attribute %s" % (self, attr))
AttributeError: <dnf.yum.rpmsack.RPMDBAdditionalDataPackage object at 0x7f10fed01b50> has no attribute reason

Local variables in innermost frame:
info: None
self: <dnf.yum.rpmsack.RPMDBAdditionalDataPackage object at 0x7f10fed01b50>
attr: u'reason'
fn: u'/var/lib/dnf/yumdb/l/1b988e7e89767dd6f085fc66322b766fa6f0a850-libvirt-daemon-config-network-1.2.7-2.fc21-x86_64/reason'

Comment 1 Chris Murphy 2014-09-02 23:50:57 UTC
Created attachment 933916 [details]
File: backtrace

Comment 2 Chris Murphy 2014-09-02 23:50:58 UTC
Created attachment 933917 [details]
File: environ

Comment 3 Honza Silhan 2014-09-04 18:23:28 UTC
Hi, thanks for the report. I cannot reproduce it, can you? Did it crash at the beginning of transaction (no package installed)? Was it your first command execution in newly installed/upgraded dnf? Upload your '/var/lib/dnf/yumdb' dir, please.

Comment 4 Chris Murphy 2014-09-04 22:20:01 UTC
Created attachment 934649 [details]
yumdb.tar

Comment 5 Chris Murphy 2014-09-04 22:20:59 UTC
And yes it always happens for me right now with a relatively new Fedora 21 installation from Fedora-Live-Workstation-x86_64-21-Alpha-TC5.iso

Comment 6 Chris Murphy 2014-09-04 22:55:45 UTC
I just reran the command, post upload of yumdb and I get this:

Traceback (most recent call last):
  File "/usr/bin/dnf", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 182, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 145, in _main
    cli.command.run_transaction()
  File "/usr/lib/python2.7/site-packages/dnf/cli/commands/group.py", line 460, in run_transaction
    db_pkg.reason = goal.group_reason(pkg, db_pkg.reason)
  File "/usr/lib/python2.7/site-packages/dnf/yum/rpmsack.py", line 291, in __getattr__
    return self._read(attr)
  File "/usr/lib/python2.7/site-packages/dnf/yum/rpmsack.py", line 255, in _read
    raise AttributeError("%s has no attribute %s" % (self, attr))
AttributeError: <dnf.yum.rpmsack.RPMDBAdditionalDataPackage object at 0x7ff44a17fb50> has no attribute reason

Comment 7 Ales Kozumplik 2014-09-05 05:27:51 UTC
*** Bug 1138376 has been marked as a duplicate of this bug. ***

Comment 8 Chris Murphy 2014-09-05 06:02:39 UTC
(In reply to Jan Silhan from comment #3)
Sorry, didn't answer all of these. It crashes at the end, right after "Complete!" appears. And it's not the first execution of dnf or yum for this installation.

Comment 9 Honza Silhan 2014-09-05 09:48:08 UTC
Thanks for additional info.

Comment 10 Honza Silhan 2014-09-10 10:53:13 UTC
Fixed in the upstream. The problem was that some mandatory packages from group were already installed on the system outside DNF with no record in yumdb. These packages are marked as group install now.

Comment 11 Fedora Update System 2014-10-05 17:42:02 UTC
dnf-0.6.2-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dnf-0.6.2-1.fc21

Comment 12 Fedora Update System 2014-10-06 05:03:38 UTC
Package dnf-0.6.2-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.6.2-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-12254/dnf-0.6.2-1.fc21
then log in and leave karma (feedback).

Comment 13 Honza Silhan 2014-12-08 10:09:02 UTC
*** Bug 1171304 has been marked as a duplicate of this bug. ***

Comment 14 Honza Silhan 2015-07-20 11:16:35 UTC
wasn't properly closed by Fedora Update System.

Comment 15 Fedora Update System 2015-08-28 18:53:33 UTC
dnf-0.6.4-6.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14323

Comment 16 Fedora Update System 2015-09-29 11:19:26 UTC
dnf-0.6.4-7.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-9bcdcdc46b

Comment 17 Fedora Update System 2015-10-02 18:52:21 UTC
dnf-0.6.4-7.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update dnf'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-9bcdcdc46b

Comment 18 Fedora Update System 2015-10-13 06:52:19 UTC
dnf-0.6.4-7.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.