Bug 81343

Summary: Rpm with Freshen option downloads unnecessary files and crashes filling the disk
Product: [Retired] Red Hat Linux Reporter: Pierre Francois <pf>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-04-03 00:19:32 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 Pierre Francois 2003-01-08 10:16:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Description of problem:
Issuing the command rpm with freshen option from a ftp mirror, like:

  rpm -Fvh ftp://some.ftp.server/some-PATH/*.rpm

causes a rather dumb behaviour of rpm:

a) it downloads all *.rpm the files, even the unnecessary
b) it fills the /var/tmp directory till it crashes causing a segmentation 
fault.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. choose a ftp server offering more rpm files than your /var/tmp file can hold
2. issue rpm -Fvh ftp://that.ftp.server/some-PATH/*.rpm
3. wait the disk is full

Actual Results:  segmentation fault

Expected Results:  1. I expect rpm not to download any unnecessary files.
2. Rpm should check if there is enough room on /var/tmp before starting to 
download, and anyway stop in another way than with a segmentation fault

Additional info:

It would be wise to install at least some packages (with few or no 
dependencies) separately instead of everything together after downloading all 
the packages.

Comment 1 Jeff Johnson 2003-04-03 00:19:32 UTC
rpm downloads files in order to get the information
necessary to tell whether the file is to be installed.

This cannot be done by looking at file name alone, as
the epoch is contained only within the header, and the
epoch is necessary to tell whether a package is "newer"

Use some other means of upgarding, like up2date/apt/yum/autorpm/etc,
instead of a remote glob if you wish to minimize bandwidth and disk
space usage.