On 14/06/16 06:07, Alastair Hughes wrote:
On 6/12/16, Allan McRae <allan@archlinux.org> wrote:
On 11/06/16 17:53, Alastair Hughes wrote:
From: Alastair Hughes <hobbitalastair@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@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.
Would something like: DUFLAGS="-sk" ./configure work for you? This would be added to the "Some influential environment variables" section of the "./configure --help" output? Now I just need to figure out how to do this! A