Sometime localepurge reports wrong total disk space freed: > * Running localepurge... > * localepurge: processing locale files in /usr/share/locale ... > * localepurge: processing locale files in /usr/kde/3.5/share/locale ... > * localepurge: processing locale files in /usr/lib/locale ... > * localepurge: processing man pages in /usr/share/man ... > * localepurge: Disk space freed in /usr/share/man: 128K > * localepurge: processing man pages in /usr/local/share/man ... > * localepurge: processing man pages in /opt/sun-jdk-1.5.0.10/man ... > * localepurge: processing man pages in /opt/sun-jdk-1.6.0/man ... > > * Total disk space freed by localepurge: 8K
sorry for all this time, my workstation is not working well lately. I will try to find the bug :)
Is this a regression over 0.5.2?
A patch for this is needed (or maybe reverting the changes related with this to behave like old 0.5.2.2 version)
The differences in the report are very minute (128K vs 8K). Perhaps something else changed on the filesystem while running the script. I think either LOCALETOTAL or MANTOTAL could evaluate to a negative number and subtract rather than add when adding both for the TOTAL. To minimize the risk of this happening, a TOTAL calculation would only have to occur right before and after something has been deleted.
Created attachment 331156 [details, diff] patch to improve calculation of freed space With this patch, the freed space is only calculated when a dir is actually removed. This minimizes the risk of something altering the diskspace during the process. Also, a freed space amount gets only added to the total when it's higher than zero. Before, this check was only applied to the freed space message output.
(In reply to comment #5) > Created attachment 331156 [details, diff] [details, diff] > patch to improve calculation of freed space > > With this patch, the freed space is only calculated when a dir is actually > removed. This minimizes the risk of something altering the diskspace during > the process. > > Also, a freed space amount gets only added to the total when it's higher > than zero. Before, this check was only applied to the freed space message > output. Hi. Thanks for the patch. I wonder where this script is maintained nowadays so we can include this patch on the tarball.
app-admin/localepurge-0.5.4 does not work fine: * localepurge: processing locale files in /usr/share/locale ... удалён «/usr/share/locale/ast/LC_MESSAGES/poedit.mo» удалён «/usr/share/locale/be@latin/LC_MESSAGES/poedit.mo» удалён «/usr/share/locale/ca@valencia/LC_MESSAGES/audacity.mo» удалён «/usr/share/locale/ca@valencia/LC_MESSAGES/poedit.mo» удалён «/usr/share/locale/fur/LC_MESSAGES/poedit.mo» удалён «/usr/share/locale/km/LC_MESSAGES/audacity.mo» удалён «/usr/share/locale/my/LC_MESSAGES/audacity.mo» удалён «/usr/share/locale/sr_RS/LC_MESSAGES/audacity.mo» * localepurge: Disk space freed in /usr/share/locale: 813K * localepurge: processing locale files in /usr/lib/locale ... * localepurge: processing locale files in /usr/share/binutils-data/x86_64-pc-linux-gnu/2.22/locale ... * localepurge: processing locale files in /usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/locale ... удалён «/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/locale/de/LC_MESSAGES/libstdc++.mo» удалён «/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/locale/fr/LC_MESSAGES/libstdc++.mo» * localepurge: Disk space freed in /usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/locale: 2K * localepurge: processing man pages in /usr/share/man ... * Total disk space freed by localepurge: 2K
(In reply to comment #7) > app-admin/localepurge-0.5.4 does not work fine: > * localepurge: processing locale files in /usr/share/locale ... > удалён «/usr/share/locale/ast/LC_MESSAGES/poedit.mo» > удалён «/usr/share/locale/be@latin/LC_MESSAGES/poedit.mo» > удалён «/usr/share/locale/ca@valencia/LC_MESSAGES/audacity.mo» > удалён «/usr/share/locale/ca@valencia/LC_MESSAGES/poedit.mo» > удалён «/usr/share/locale/fur/LC_MESSAGES/poedit.mo» > удалён «/usr/share/locale/km/LC_MESSAGES/audacity.mo» > удалён «/usr/share/locale/my/LC_MESSAGES/audacity.mo» > удалён «/usr/share/locale/sr_RS/LC_MESSAGES/audacity.mo» > * localepurge: Disk space freed in /usr/share/locale: 813K > * localepurge: processing locale files in /usr/lib/locale ... > * localepurge: processing locale files in > /usr/share/binutils-data/x86_64-pc-linux-gnu/2.22/locale ... > * localepurge: processing locale files in > /usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/locale ... > удалён > «/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/locale/de/LC_MESSAGES/ > libstdc++.mo» > удалён > «/usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/locale/fr/LC_MESSAGES/ > libstdc++.mo» > * localepurge: Disk space freed in > /usr/share/gcc-data/x86_64-pc-linux-gnu/4.5.4/locale: 2K > * localepurge: processing man pages in /usr/share/man ... > > * Total disk space freed by localepurge: 2K I think this is a separate bug and should be discussed in 445910
Created attachment 331456 [details, diff] Err, forgot to add the sum for each directory. This patch applies to 0.5.4, whereas the previous patch was for 0.5.3.3-r1.
+*localepurge-0.5.4-r1 (04 Dec 2012) + + 04 Dec 2012; Markos Chandras <hwoarang@gentoo.org> + +files/localepurge-0.5.4-directorysum.patch, + +files/localepurge-0.5.4-parentdir.patch, +localepurge-0.5.4-r1.ebuild, + -localepurge-0.5.4.ebuild: + Revbump. Fixes bug #164544 and #445910 +