Bug 2895

Summary: rpm has crytic error message
Product: [Retired] Red Hat Linux Reporter: phinely
Component: rpmAssignee: Jay Turner <jturner>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-05-18 14:44:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description phinely 1999-05-17 23:33:24 UTC
When trying to install an rpm package with rpm, rpm gives a
rather cryptic error message if the md5 checksum of the file
fails.  All rpm says is:
  error: foo.rpm cannot be installed

Instead rpm should explain the problem in more detail.
Something like this:
  MD5 checksum failed.  file is corrupt.
  foo.rpm cannot be install

Bit corruption of packages is not uncommon, especially when
they have been transported over ftp.  The IP checksum
actually misses a disturbing number of bit errors.

Comment 1 Jeff Johnson 1999-05-18 14:44:59 UTC
By design, rpm does not check MD5 sums during install (this is
a separate operation rpm --checksig). The error message that
you are seeing comes from a failure to correctly read the package
header. The likeliest failures in trying to read the header are
    1) incorrect magic number
    2) truncated header
which have equally cryptic (but distinguishable!) error messages.

Comment 2 kestes 2000-11-03 16:23:19 UTC
This is such a bad error I can not believe that you defend it
  error: foo.rpm cannot be installed
Gives no hint that the problem is with the package file. Clearly
you need to create a simple santiy check that the package file is not corupt
This could be as simple as checking the file magic number (incase the file
is totally hosed) and checking that the file length is larger then the
 payload size listed in the header magic number section(in case it was
 truncated).  See scripts/rpmdiff for an example of sanity checking