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

Re: Bug#650077: dpkg: The Installed-Size estimate can be wrong by a factor of 8 or a difference of 100MB



Hi,

> > 	| awk '{total = total + int($1/4096) + 4096}END{print total}'
> 
I don't understand this line. Counting file blocks works like this:

> > 	| awk '{total = total + int(($1+4095)/4096)}END{print total}'

except that we don't know what the destination block size is, so I wouldn't
bother. Instead I would count the number of files separately; the receiver
can multiply #files with LOCAL_BLOCKSIZEC, add #bytes, and warn if that is
smaller than the free space on /usr; dito for #files vs. number of free
inodes.

Having dpkg deal with ENOSPC gracefully is a good idea, but IMHO mostly
orthogonal.

-- 
-- Matthias Urlichs


Reply to: