[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: calling rpmtsRun() in test mode.



On Thu, Jan 23, 2003 at 05:01:07PM -0500, Tristan Van Berkom wrote:
> Hi there,
> 
> 	I looked through `rpmrc' and `macros' file
> first; and before I start looking through the source
> I might as well ask the people who know :)
> 
> 	Is there a (or "what is the") way to give rpm
> the partition information. Hmmm; to put this into context;
> here is my problem. I'm running a series of rpm transactions
> in test mode before I actually `perform the transactions'.
> 

No way to pass in partition info.

You can disable checking by doing equivalent of --ignoresize
which sets ... checking ... 
	RPMPROB_FILTER_DISKSPACE|RPMPROB_FILTER_DISKNODES
in the problem filter.

You can also get this information early by setting
	 RPMTRANS_FLAG_BUILD_PROBS
which exits in the middle of run transaction. A little cheaper
than --test.

> rpm tells me a bunch of errors like (IIRC):
> 
> package-name-ver.sion-build.i386.rpm needs 5MB on "/" filesystem to
> install
> 
> which is exactly the kind of stuff I want to hear before
> actually installing *but* every package; in a transaction
> with about 5 installs 3 erases and 30 upgrades; wants
> space on the "/" filesystem (which is obviously not the case).
> 
> does rpm parse "/etc/fstab" or "/etc/mtab" to figure this out ?
> (we actually use a non-standard "/etc/ttfstab").
> 

rpm does getmntent() for mount points, statvfs() for diskspace,
algorithm has heuristic "21/20" (i.e. 1/0.95) to estimate root
reserved space at 5%.

All the gritty/grotty gook is in lib/fs.c.

Take a look at
	rpm -q --qf '[%{fsnames} %{fssizes}\n]' some_pkg
if you want to see what values are found.

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []