Good but ... mk-origtargz Allow more files to be deleted than can fit inside argv (`getconf ARG_MAX`)
Ximin Luo
infinity0 at debian.org
Tue Jan 23 15:02:00 UTC 2018
Osamu Aoki:
> Hi,
>
> [..]
>
> This looks a reasonable patch. But I don't know why you chose
> 16384=0x400 as the max figure.
>
> Following your comment, I tried on my local machine
> $ getconf ARG_MAX
> 2097152
>
> This is bigger than 16384.
>
> If this is different on different system, why not dynamically check and
> set it with some safety margin like `getconf ARG_MAX` - 16 etc.?
>
Hi Osamu, ARG_MAX is measured in bytes, not number of arguments.
I calculated 16384 as 2M / 128, 128 being a generously-high estimated value for "average path length" in debian packages.
I agree it would be clearer to replace 16384 with `getconf ARG_MAX / AV_PATH_LENGTH_EST` and define AV_PATH_LENGTH_EST = 128 near the top, but my perl knowledge is very basic and I wasn't sure of the best way to shell out to another program.
X
--
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git
More information about the devscripts-devel
mailing list