]> git.ipfire.org Git - thirdparty/openwrt.git/commit
build: call ipkg-remove using xargs if #args>=512 19516/head
authorEric Fahlgren <ericfahlgren@gmail.com>
Thu, 24 Jul 2025 17:09:04 +0000 (10:09 -0700)
committerNick Hainke <vincent@systemli.org>
Fri, 25 Jul 2025 06:41:27 +0000 (08:41 +0200)
commitac9a97e49b8cd46cd19cbfdeb147b3815f5af0ba
tree83d2b0ecd32fa86dfddacd6c543351d48fd48782
parent19bc6e8c7f86b197b7bccc45c6af4a3ff521e8ee
build: call ipkg-remove using xargs if #args>=512

The wildcard call to clean up luci package (luci*) can pick up over
2,300 files when the full tree is built. Running make package/luci/clean
or a second run of make package/luci/compile would fail with an
'Argument list too long' error.

To avoid that, a maybe_use_xargs function was created that runs the
command straight as usual if the number of arguments is < 512, or saves
the list in a temporary file and feeds it to xargs otherwise.

This is an update to current file names and resubmission of
https://lists.openwrt.org/pipermail/openwrt-devel/2020-February/027525.html

Fixes: https://github.com/openwrt/openwrt/issues/19510
Fixes: https://github.com/openwrt/luci/issues/7869
Authored-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19516
Signed-off-by: Nick Hainke <vincent@systemli.org>
include/package-pack.mk