Bug 1425228

Summary: dnf bails out in a middle of transaction on an error in some package script
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal.jnn>
Component: dnfAssignee: rpm-software-management
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---   
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-02-27 14:45:06 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 Michal Jaegermann 2017-02-20 22:57:22 UTC
Description of problem:

While running rawhide updates in a cleanup phase of a substantial update the following happened:

error: %preun(emacs-1:25.1-2.fc26.x86_64) scriptlet failed, exit status 2
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!

The net effect of this bail out was that I was left with close to 500 duplicate packages and hard to asses number of posttrans scriptlets which were NOT run.  In particular  /usr/bin/emacs was missing as this is a link created with a help of /usr/sbin/alternatives


Version-Release number of selected component (if applicable):
dnf-2.0.0-2.fc26


Expected results:
dnf noting an error and continuing with a remainder of a transaction.

Comment 1 Igor Gnatenko 2017-02-27 14:45:06 UTC

*** This bug has been marked as a duplicate of bug 1340507 ***