[pacman-dev] [RFC] [PATCH] Implement a du --apparent-size equivalent

Alastair Hughes hobbitalastair at gmail.com
Mon Jun 13 20:07:40 UTC 2016

On 6/12/16, Allan McRae <allan at archlinux.org> wrote:
> On 11/06/16 17:53, Alastair Hughes wrote:
>> From: Alastair Hughes <hobbitalastair at yandex.com>
>> Add a pkgsize binary which mimics the behaviour of GNU du --apparent-size
>> -skl.
>> Fixes FS#47943.
>> Signed-off-by: Alastair Hughes <hobbitalastair at gmail.com>
>> ---
>> I haven't done much C programming before - I'd appreciate any feedback you
>> have.
>> At the moment, this patch creates a new pkgsize binary as an extra
>> utility, and
>> installs with the other utilities.
>> I think that it would be better if it installed it to a libexec dir, but
>> I'm
>> not entirely sure how to do that without making a mess.
> I really don't want to provide a binary just to do this.
> My preferred solution is just to test "du -sk --apparent-size" in a
> temporary directory during configure and switch to just "du -sk" if it
> fails.
> Allan

I'm cross compiling; in that case, the host system has a different du
than the target system, so testing at configure time would not be
appropriate. Would checking at runtime be acceptable?
Alternatively, I would be happy with a configure flag to override the
default choice.

Alastair Hughes

More information about the pacman-dev mailing list