[pacman-dev] Disk space checking branch "complete"

Xavier Chantry chantry.xavier at gmail.com
Wed Nov 17 21:37:21 CET 2010


On Wed, Nov 17, 2010 at 1:06 AM, Dan McGee <dpmcgee at gmail.com> wrote:
>
> We've putzed around with this a few times, haven't we? This basically
> "reverts" this one:
>
> commit 149839c5391e9a93465f86dbb8d095a0150d755d
> Author: Xavier Chantry <shiningxc at gmail.com>
> Date:   Mon May 26 23:46:01 2008 +0200
>
>    du -b is not available on BSD, use du -k instead.
>
>    This fixes FS#10459.
>
>    There is apparently no portable ways to get the apparent size of a file,
>    like du -b does. So the best compromise seems to get the block size in kB,
>    and then convert that to byte so that we keep compatibility.
>
>    Signed-off-by: Xavier Chantry <shiningxc at gmail.com>
>    Signed-off-by: Dan McGee <dan at archlinux.org>
>

It doesn't revert my commit, it just takes the alternative approach
which was already suggested in the bug report :
https://bugs.archlinux.org/task/10459#comment28616

We do this already for stat and sed, we do this in C (c.f. diskspace),
so why not for du ? I've no problem with that.
That said, I've no problem with a C impl either. Would it be portable ?

Just wanted to mention that even though I wrote this patch, I am for
restoring apparent size. IIRC we already got a report/request for that
a while ago and I already felt that way back then.


More information about the pacman-dev mailing list