FS#47943 - busybox du does not support --apparent-size

Attached to Project: Pacman
Opened by Alastair Hughes (pypi) - Friday, 29 January 2016, 19:16 GMT
Last edited by Allan McRae (Allan) - Saturday, 14 January 2017, 07:59 GMT
Task Type Bug Report
Category makepkg
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version 4.2.1
Due in Version 5.1.0
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

busybox does not support GNU du's --apparent-size argument.
This causes a failure to build a package (du fails, which causes an infinite loop).

This has come up before:

https://bugs.archlinux.org/task/10459
https://lists.archlinux.org/pipermail/pacman-dev/2010-November/011989.html

Currently, the lack of support in other implementations means that this is worked around in the configure script.
Relevant commits/code:

https://gitorious.org/pacman-bsd/pacman-bsd/commit/cf3341fe591293a493bc925e0433a1f696b37d90?p=pacman-bsd:pacman-bsd.git;a=commitdiff;h=cf3341fe591293a493bc925e0433a1f696b37d90;hp=8b367d4441ba85b5548285d987afcfc84c4fcb3e
https://projects.archlinux.org/pacman.git/tree/configure.ac#n335

Currently I can workaround this issue by removing the --apparent-size argument.
This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 14 January 2017, 07:59 GMT
Reason for closing:  Fixed
Additional comments about closing:  Use DUPATH during configure. Git commit 36f456cc
Comment by Alastair Hughes (pypi) - Thursday, 03 March 2016, 07:12 GMT
I did have a go at making something that duplicated the current behavior, however I have done very little C coding...
The attached file seems to work largely as expected, but du ignores hard links, while this counts them twice. It also uses ftw, which appears to be an extension; I suppose that this is less than ideal, at least from a portability perspective. I appreciate that it is most likely completely unusable, but I'd love some constructive comments.

Assuming I managed to write something usable, how would the result be integrated into pacman? I'm assuming that it would be a standalone tool installed to the libexec dir, but where would it sit in the source tree?
Comment by Alastair Hughes (pypi) - Sunday, 12 June 2016, 07:22 GMT Comment by Alastair Hughes (pypi) - Sunday, 24 July 2016, 19:56 GMT
Second patch posted, but I need to repost as I mucked it up: https://lists.archlinux.org/pipermail/pacman-dev/2016-June/021201.html

EDIT: Follow up (modified, but same general approach) patch posted: https://lists.archlinux.org/pipermail/pacman-dev/2016-August/021266.html

Loading...