Hi! On Tue, 2011-06-14 at 23:25:00 +0200, Ludovic Brenta wrote: > Package: dpkg-dev > Version: 1.16.0.3 > Severity: normal > Tags: patch
> While building one of my packages I was surprised by the results of > dpkg-gencontrol: > > Installed-Size: 128956 > > when the size of the binary .deb file is only 4608146. As it turns out, > this is because "du -sk" and "du -sk --apparent-size" give wildly > different results. Without --apparent-size, du takes the filesystem > block size into account; a large number of small files (as in my > package) therefore inflates the Installed-Size out of proportion. Yes, this has been annoying me for some time now, as aptitude for example reports size changes (sometimes huge) for package rebuilds when there should really be no major differences. > It could be argued that installing the .deb package containing many > small files on a target system will also consume lots of blocks, each > with some minimum size, but this size depends on the filesystem chosen > on the target machine, not on the Debian package. In particular, > reiserfs stores lots of small files efficiently. Right, one problem with --apparent-size is that it might report less space than what will be used which is a problem for the field's purpose to assist in available disk space checks, but no information provided in that field will be accurate enough for such simplistic checks anyway, and as you mention basing that information on the build system is more bogus than not. Having consistent information seems to be more important in this case. Another slight issue is that --apparent-size is a GNUism, but then we rely on them for other tool invokations anyway. > As a consequence I suggest passing --apparent-size to du when calling du > from dpkg-gencontrol, i.e. Thanks, I'm pushing this to the git repo now. regards, guillem -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

