Bug 1409797

Summary: [abrt] dnf: rpmtrans.py:551:_scriptError:AttributeError: 'NoneType' object has no attribute 'name'
Product: [Fedora] Fedora Reporter: Petr Schindler <pschindl>
Component: dnfAssignee: rpm-software-management
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: high    
Version: 26CC: jmracek, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/172584243a2ad77d33df52fff794d24d779701fc
Whiteboard: abrt_hash:eeba31f8d6e98579f74eb0a5bb8e7aca1072879a;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-27 12:19:44 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: dnf-makecache.log
none
File: environ none

Description Petr Schindler 2017-01-03 12:48:18 UTC
Description of problem:
This traceback appeared during dnf distro-sync in the clean up phase. The system
ended up with multiple versions of packages.

Version-Release number of selected component:
dnf-2.0.0-0.rc2.3.fc26

Additional info:
reporter:       libreport-2.9.0
cmdline:        /usr/libexec/system-python /usr/bin/dnf distro-sync
executable:     /usr/bin/dnf
kernel:         4.9.0-0.rc7.git3.1.fc26.x86_64
runlevel:       N 5
type:           Python3
uid:            0

Truncated backtrace:
rpmtrans.py:551:_scriptError:AttributeError: 'NoneType' object has no attribute 'name'

Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 427, in callback
    self._scriptError(amount, total, key)
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 551, in _scriptError
    name = pkg.name
AttributeError: 'NoneType' object has no attribute 'name'

Local variables in innermost frame:
amount: 1025
pkg: None
self: <dnf.yum.rpmtrans.RPMTransaction object at 0x7f127a049c88>
_: None
total: 2
key: 'calibre'
scriptlet_name: 'PREUN'

Comment 1 Petr Schindler 2017-01-03 12:48:27 UTC
Created attachment 1236877 [details]
File: _var_log_dnf.log

Comment 2 Petr Schindler 2017-01-03 12:48:28 UTC
Created attachment 1236878 [details]
File: backtrace

Comment 3 Petr Schindler 2017-01-03 12:48:33 UTC
Created attachment 1236879 [details]
File: dnf-makecache.log

Comment 4 Petr Schindler 2017-01-03 12:48:34 UTC
Created attachment 1236880 [details]
File: environ

Comment 5 Kamil Páral 2017-01-03 13:16:27 UTC
This problem seems to have been caused by calibre-2.73.0-1.fc26 package failing in a preun scriptlet and therefore the package removal failing as a whole. Still, dnf should not crash.

Comment 6 Fedora End Of Life 2017-02-28 10:52:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 7 Jaroslav Mracek 2017-03-27 12:19:44 UTC
The problem was fixed in https://github.com/rpm-software-management/dnf/pull/754 and https://github.com/rpm-software-management/dnf/pull/763 and released in dnf-2.2.0-1.