Bug 1309778

Summary: "dnf upgrade" nonexistent or corrupt local rpm crashes in libhawkey
Product: [Fedora] Fedora Reporter: Oliver Henshaw <oliver.henshaw>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: jsilhan, mdomonko, mluscon, packaging-team-maint, pnemade, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-22 12:59:17 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:
Attachments:
Description Flags
backtrace from "dnf install nothing.rpm" none

Description Oliver Henshaw 2016-02-18 16:38:57 UTC
Created attachment 1128284 [details]
backtrace from "dnf install nothing.rpm"

Description of problem:

dnf crashes in libhawkey when attempting to upgrade with a corrupted local .rpm, but "dnf install" completes/fails in the expected way.

# touch nothing.rpm
or
# curl -O https://kojipkgs.fedoraproject.org//packages/WHOOPSITYPEDWRONGANDHAVEGOTA404ERRORHTMLPAGEOHDEAR/hawkey/0.6.2/4.fc24/x86_64/hawkey-0.6.2-4.fc24.x86_64.rpm

# dnf install nothing,rpm
Last metadata expiration check performed 0:54:36 ago on Thu Feb 18 14:57:19 2016.
Dependencies resolved.
Nothing to do.
Complete!
# dnf update nothing.rpm
Last metadata expiration check performed 0:55:26 ago on Thu Feb 18 14:57:19 2016.
Segmentation fault (core dumped)

I obtained the attached backtrace with gdb,


Version-Release number of selected component (if applicable):
dnf-1.1.6-2.fc22.noarch
hawkey-0.6.2-2.fc22.x86_64


Expected results:

Do nothing, like "dnf install",


Additional info:

Actually the "dnf install" behaviour could improve too, when two packages have dependencies:
$dnf install selinux-policy.rpm selinux-policy-targeted-CORRUPT.rpm
acts like
$dnf install selinux-policy.rpm
and won't succedd unless I --allowerasing, then it asks to remove the installed selinux-policy-targeted

Comment 1 Michal Domonkos 2016-02-22 12:59:17 UTC

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