Bug 1340507

Summary: when there's scriplet error in rpm transaction, DNF raises traceback
Product: [Fedora] Fedora Reporter: Igor Gnatenko <ignatenko>
Component: dnfAssignee: rpm-software-management
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: darrellpf, jmracek, michal.jnn, mluscon, packaging-team-maint, pantinor, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-11 16:56:56 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 Igor Gnatenko 2016-05-27 15:25:02 UTC
Failed to rename /usr/share/mime/application/x-java-archive.xml.new as /usr/share/mime/application/x-java-archive.xml: Structure needs cleaning
warning: %triggerin(shared-mime-info-1.6-1.fc24.x86_64) scriptlet failed, exit status 1
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 427, in callback
    self._scriptError(bytes, total, h)
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 557, in _scriptError
    pkg, _, _ = self._extract_cbkey(h)
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 229, in _extract_cbkey
    return self._extract_str_cbkey(cbkey)
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 237, in _extract_str_cbkey
    assert(isinstance(name, basestring))
AssertionError
FATAL ERROR: python callback ??? failed, aborting!


I was using dnf-1.1.8

Comment 1 Fedora Admin XMLRPC Client 2016-07-08 09:25:09 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Jan Kurik 2016-07-26 05:01:15 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 3 Igor Gnatenko 2017-01-11 22:57:02 UTC
*** Bug 1411049 has been marked as a duplicate of this bug. ***

Comment 4 darrell pfeifer 2017-01-12 19:57:21 UTC
  Upgrading   : systemd-libs-232-7.fc26.x86_64                                                                            1/21 
  Upgrading   : systemd-pam-232-7.fc26.x86_64                                                                             2/21 
  Upgrading   : systemd-232-7.fc26.x86_64                                                                                 3/21 
  Upgrading   : bind99-license-9.9.9-4.P5.fc26.noarch                                                                     4/21 
  Upgrading   : bind99-libs-9.9.9-4.P5.fc26.x86_64                                                                        5/21 
  Upgrading   : systemd-udev-232-7.fc26.x86_64                                                                            6/21 
  Upgrading   : systemd-container-232-7.fc26.x86_64                                                                       7/21 
  Upgrading   : gnome-settings-daemon-3.23.3-1.fc26.x86_64                                                                8/21 
  Cleanup     : systemd-container-232-6.fc26.x86_64                                                                       9/21 
  Cleanup     : systemd-udev-232-6.fc26.x86_64                                                                           10/21 
  Cleanup     : systemd-pam-232-6.fc26.x86_64                                                                            11/21 
  Cleanup     : systemd-232-6.fc26.x86_64                                                                                12/21 
/var/tmp/rpm-tmp.6DhLlY: line 1: fg: no job control
error: %preun(systemd-udev-232-3.fc26.x86_64) scriptlet failed, exit status 1
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/dnf/yum/rpmtrans.py", line 427, in callback
    self._scriptError(amount, total, key)
  File "/usr/lib/python3.6/site-packages/dnf/yum/rpmtrans.py", line 551, in _scriptError
    name = pkg.name
AttributeError: 'NoneType' object has no attribute 'name'
FATAL ERROR: python callback ??? failed, aborting!

Comment 5 darrell pfeifer 2017-01-17 12:53:01 UTC
Running transaction
  Upgrading   : systemd-libs-232-8.fc26.x86_64                                                                            1/40 
  Upgrading   : systemd-pam-232-8.fc26.x86_64                                                                             2/40 
  Upgrading   : systemd-232-8.fc26.x86_64                                                                                 3/40 
  Upgrading   : selinux-policy-3.13.1-234.fc26.noarch                                                                     4/40 
  Upgrading   : publicsuffix-list-dafsa-20170116-1.fc26.noarch                                                            5/40 
  Upgrading   : libpsl-0.17.0-1.fc26.x86_64                                                                               6/40 
  Upgrading   : selinux-policy-targeted-3.13.1-234.fc26.noarch                                                            7/40 
  Upgrading   : systemd-udev-232-8.fc26.x86_64                                                                            8/40 
  Upgrading   : systemd-container-232-8.fc26.x86_64                                                                       9/40 
  Upgrading   : gnome-logs-3.23.4-1.fc26.x86_64                                                                          10/40 
  Upgrading   : shotwell-0.25.3-2.fc26.x86_64                                                                            11/40 
  Upgrading   : python3-pyatspi-2.20.3-1.fc26.noarch                                                                     12/40 
  Upgrading   : pyatspi-2.20.3-1.fc26.noarch                                                                             13/40 
  Upgrading   : publicsuffix-list-20170116-1.fc26.noarch                                                                 14/40 
  Upgrading   : libwsman1-2.6.3-1.git4391e5c.fc26.x86_64                                                                 15/40 
  Upgrading   : libtasn1-4.10-1.fc26.x86_64                                                                              16/40 
  Upgrading   : ibus-typing-booster-1.5.18-1.fc26.noarch                                                                 17/40 
  Cleanup     : selinux-policy-targeted-3.13.1-233.fc26.noarch                                                           18/40 
  Cleanup     : systemd-container-232-7.fc26.x86_64                                                                      19/40 
  Cleanup     : systemd-udev-232-7.fc26.x86_64                                                                           20/40 
  Cleanup     : systemd-pam-232-7.fc26.x86_64                                                                            21/40 
  Cleanup     : systemd-232-7.fc26.x86_64                                                                                22/40 
/var/tmp/rpm-tmp.tiGGCI: line 1: fg: no job control
error: %preun(systemd-udev-232-3.fc26.x86_64) scriptlet failed, exit status 1
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/dnf/yum/rpmtrans.py", line 427, in callback
    self._scriptError(amount, total, key)
  File "/usr/lib/python3.6/site-packages/dnf/yum/rpmtrans.py", line 551, in _scriptError
    name = pkg.name
AttributeError: 'NoneType' object has no attribute 'name'
FATAL ERROR: python callback ??? failed, aborting!

Comment 6 Igor Gnatenko 2017-01-30 09:01:42 UTC
*** Bug 1417546 has been marked as a duplicate of this bug. ***

Comment 7 Igor Gnatenko 2017-02-27 14:45:06 UTC
*** Bug 1425228 has been marked as a duplicate of this bug. ***

Comment 8 Jaroslav Mracek 2017-04-10 15:24:56 UTC
Igor, please can you test it with latest dnf-2.3.0-1. I think the problem was already solved.