Package: dpkg Version: 1.16.1.2 Severity: wishlist Symptom ~~~~~~~ I just installed libjs-mathjax. According to its Installed-Size this would just consume 16512KB. Now according to policy this is just an estimate of course. But how accurate is it actually? So I installed said package on ext3. Turns out /usr/share/javascript/mathjax takes up 127296KB and /usr/share/doc/mathjax takes another 1200KB. So our estimate is wrong by a factor of 8 or a difference of 100MB. This estimate is also used to determine whether the disk has enough space, so if my disk just had 50MB left, aptitude would have tried to install this package and failed.
The actual problem ~~~~~~~~~~~~~~~~~~ Problems with Installed-Size are not exactly new as discussion in http://bugs.debian.org/534408 (unit for Installed-Size) and http://bugs.debian.org/630533 (usage of du --apparent-size) have shown. So what is different this time? Installing the very same package on a btrfs yields a size that is much closer to the listed Installed-Size. (I don't have any numbers on this.) So whatever dpkg puts into this field, it *will* be wrong somewhere. The policy already mentions that this estimate cannot be accurate everywhere, but in fact it will be wrong by a factor of at least 2.5 (=sqrt(8)) or a difference of at least 50MB (=100MB/2) somewhere. Any attempt to change the computation of this value thus cannot fix this bug. Discussion ~~~~~~~~~~ In the example of libjs-mathjax the reason for the huge difference is the inclusion of a large number of very small files. Some filesystems allocate a block for each of these files and others are able to store multiple files in a block. A simple approach could be to include an additional field ("Installed-Files"?) that returns the number of files in the package. A second estimate for the Installed-Size would then be given by the number of files times the block size. The maximum of both estimates could be used. It would solve the immediate symptoms with libjs-mathjax. It is not without problems though. For instance I did not explain what block size to use. An administrator may have different file systems set up for / and /usr. Also the question remains whether this feature is worth the associated effort. To get discussion going I pull in debian-policy@l.d.o. Helmut -- To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20111126110639.ga30...@alf.mars