[Aptitude-devel] Bug#499872: aptitude: autoclean calculate wrong freeed disk space

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Sat Aug 29 16:33:10 UTC 2015


Control: tags -1 + pending


Hello Paul,

2008-09-23 08:11 Paul Menzel:
>Subject: aptitude: autoclean calculate wrong freeed disk space
>Package: aptitude
>Version: 0.4.11.10-1
>Severity: minor
>
>*** Please type your report below this line ***
>
>Dear DDs,
>
>
>$ df -h
>/dev/mapper/x                      9,9G  9,2G  201M  98% /var
>$ sudo aptitude autoclean
>[…]
>1106MB freigegeben
>/dev/mapper/x                      9,9G  2,2G  7,2G  24% /var
>
>So it should be something around 7 GB?!

I think that there was a problem with 32-bit int limits, it kept adding
past the boundaries of 32 bits, so if the total amount was >2GB it was
reporting wrong sizes always between 0 and 2GB (the SizeToStr() function
from apt in strutl.h, that aptitude uses here, seems to convert negative
into positive integers).

I just committed a fix that will appear in the next release that I
believe that fixes this issue (using 64-bit instead of 'long' for the
total counter), so I am marking this as pending.


Cheers.
--
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>



More information about the Aptitude-devel mailing list