Bug 625759

Summary: yum is unable to download an rpm of 2.9GB returns negative file size -1286380771
Product: Red Hat Enterprise Linux 6 Reporter: Grant Williamson <grant_williamson>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-20 13:23:06 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:

Description Grant Williamson 2010-08-20 11:28:46 UTC
Description of problem:
I created an rpm of a KVM image.
This rpm can be installed locally on machine, however
yum is unable to download and install this large rpm.
yum reports the size of the rpm to be -1286380771, even though the metadata would report the correct size.

Version-Release number of selected component (if applicable):
yum-3.2.27-13.el6.noarch
rpm-4.8.0-12.el6.x86_64

How reproducible:
create large rpm i.e. 2.9GB, add to a ftp/file/http yum repo, generate headers
try and install it fails ..

yum install ibm-winxp-kvm-3.01
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ibm-winxp-kvm-3.01.noarch 0:1-1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved
Package                                              Arch                                     Version                               Repository                             Size

Installing:
ibm-winxp-kvm-3.01                                   noarch                                   1-1                                   kvm                                   -1286380771.0  

Transaction Summary

Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: -1286380771  
Installed size: -1250594428  
Is this ok [y/N]: 

Downloading Packages:
ftp://blah/ibm-winxp-kvm-3.01-1-1.noarch.rpm: [Errno 14] Downloaded more than max size for ftp://blah/ibm-winxp-kvm-3.01-1-1.noarch.rpm: 16384 > -1286380771
Trying other mirror.

Error Downloading Packages:
  ibm-winxp-kvm-3.01-1-1.noarch: failure: ibm-winxp-kvm-3.01-1-1.noarch.rpm from kvm: [Errno 256] No more mirrors to try.

Actual results:
File is less that cpio 4gb limit, file will install locally.
Yum download/install fails.

Expected results:
Should download and install.

If I unpack the primary.xml.gz from the repodata I generated.
The size would appear to be correct
<size package="3008586525" installed="3044372868" archive="3044374108"/>

rpm header
Name        : ibm-winxp-kvm-3.01           Relocations: (not relocatable)
Version     : 1                                 Vendor: (none)
Release     : 1                             Build Date: Fri 20 Aug 2010 12:42:15 AM EDT
Install Date: (not installed)               Build Host: superrh
Group       : Applications/Emulators        Source RPM: ibm-winxp-kvm-3.01-1-1.nosrc.rpm
Size        : 3044372868                       License: 

Additional info:
Is there any limit set here?

Comment 2 Grant Williamson 2010-08-20 12:34:16 UTC
I can get the rpm to download with a little hack, with an errors since the
checksum fails since "file size" does not match. But the md5sum is good.

i.e.
gunzip primary.xml.gz
Change the size package/installed/archive to blank
<size package="" installed="" archive=""/>
find the size/sha256 sum of the file and modify the results in repomd.xml
ls -l primary.xml ; sha256sum primary.xml ; gzip primary.xml ; ls -l
primary.xml.gz ; sha256sum primary.xml.gz

yumdownloader ibm-winxp-kvm-3.01
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
ibm-winxp-kvm-3.01-1-1.noarch.rpm                                              
                                                                          | 2.8
GB     01:16     
ftp://blah/ibm-winxp-kvm-3.01-1-1.noarch.rpm: [Errno -1] Package does not match
intended download. Suggestion: run yum clean metadata
Trying other mirror.
Could not download/verify pkg ibm-winxp-kvm-3.01-1-1.noarch: failure:
ibm-winxp-kvm-3.01-1-1.noarch.rpm from kvm: [Errno 256] No more mirrors to try.

Something does not seem to parse the size correctly.

Comment 3 James Antill 2010-08-20 13:23:06 UTC

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