On Thu, Mar 07, 2019 at 10:07:12PM -0500, Eli Schwartz wrote:
On 3/7/19 9:36 PM, Santiago Torres wrote:
This patchset is a WIP that tries to address FS#61717[1].
This is my first patch for pacman, so I may be missing a couple of the heuristics of proper pacman develoment. Namely, I'm worried about the use of xargs (I went down this road because I wanted to have the minimal set of changes). I'm not sure what're the heuristics for what I can assume (e.g., can findutils be assumed to exist?).
We explicitly use find -exec elsewhere, so that should be fine.
xargs --null is a GNU-ism and does not work on supported targets: busybox xargs, and BSD xargs. Both support -0, but it is anyways a better idea to simply stick with POSIX-defined find -exec ... {} +
Oh ok, Ill move to a find-exec construct then.
(I think you can generally assume that long options will not work by default, actually. Neither busybox nor BSD utilities typically seem to implement them.)
TIL, thanks!
As a followup of this, I removed the configure.ac stuff related to DUPATH and DUFLAGS. I'm not sure if we'd want to add XARGSPATH or so. I opted to not do that just yet.
We do not need this; the only reason du is configurable rather than relying on the PATH, is because people had wrapper programs that pretended to be du, but were broken: https://bugs.archlinux.org/task/19932
Aha, noted!
No one tries to colorize the output of find -exec or of xargs, I hope...
Lol I hope so too. Let me follow up with a v2 using find -exec cat {} \;... Thanks! -Santiago.