Mailinglist Archive: zypp-devel (148 mails)

< Previous Next >
Re: [zypp-devel] checking free space
  • From: Michael Andres <ma@xxxxxxx>
  • Date: Wed, 26 Mar 2008 11:42:04 +0100
  • Message-id: <20080326104204.GA23561@xxxxxxx>
On Fri, Mar 21, Josef Reidinger wrote:

Hi,
in bnc #331602 user says that zypper write to him that he hasn't enough
free space. I look and zypper doesn't check this. But also when I
looking I cannot find in libzypp if this is somewhere checked (only use
of df function is in making cache). So whole check for enough free space
is in rpm program or I overlook something?

zypp does not do this automatically, but the application is able to
check how much space the selected packages will consume. But this
requires that the repositories provide proper disk usage data (susetags
does, yum does not). In case we ship .solv files for 11.0 they hopefully
do include disk usage data.


But rpm checks as well. In order to see how the package distributes
across filesystems rpm has to analyse the packages filelist, and they do
not take hardlinks into account.

If you sum up the filesizes

$ rpm -q glibc-locale -lv | awk '{s+=$5}END{print s}
300748755

you get ~300MB.

But a lot of these files are hardlinks, thus the actual size is

$ rpm -q glibc-locale -i | grep '^Size'
Size : 76262588

~76MB.


AFAIK rpm stores device and inode data, so it should be possible to
detect the hardlinks and compute it correctly.

--

cu,
Michael Andres

+------------------------------------------------------------------+
Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4
+------------------------------------------------------------------+
Michael Andres YaST Development ma@xxxxxxxxxx
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0
+------------------------------------------------------------------+

--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx

< Previous Next >
References