reassign 539434 apt
retitle 539434 apt: does not report properly perform unit conversions
tags 539434 -moreinfo
thanks

On Fri, Jul 31, 2009 at 1:13 PM, Eugene V. Lyubimkin<jackyf.de...@gmail.com> 
wrote:
This may be a bug in apt-get or cupt, I'm not sure. But the same
command on both produces different predictions on the downloaded and
installed size of the same set of packages:

The following 9 packages will be INSTALLED:

iceweasel libmozjs1d libnspr4-0d libnss3-1d libstartup-notification0 
libxcb-atom1 libxcb-aux0 libxcb-event1 xulrunner-1.9

Given the small differences, I cannot try to verify this on my system, so
let's verify the result on yours.

Let's do 'cupt show iceweasel libmozjs1d libnspr4-0d libnss3-1d
libstartup-notification0 libxcb-atom1 libxcb-aux0 libxcb-event1 xulrunner-1.9
| grep ize' and summarize sizes by hand (xcalc, bc -q etc.) to see which
package manager is not right.


This looks like a bug in apt. Observe:

d...@skynet:~$ echo "(+ $(apt-cache show iceweasel libmozjs1d libnspr4-0d libnss3-1d 
libstartup-notification0 libxcb-atom1 libxcb-aux0 libxcb-event1 xulrunner-1.9  | grep 
^Size | awk '{print $2}' | xargs))" | ypsilon -m

10418344

So apt itself agrees that the expected Size of these packages is 10418344 Bytes.

Now, the question is, should apt say there are 1024 bytes in a kilobyte, or 1000? Apt currently does the latter and truncates this to 10.4 MiB. I believe the former is more proper, and it should reconvert this to 9.94 MiB.
Note that other UNIX tools, like "free", also follow the former convention like 
cupt.

Regards,
Daniel

--
Daniel Moerner <dmoer...@gmail.com>


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to