mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-11 15:04:26 +00:00
build: handle directory with whitespace in AUTOREMOVE clean
Package with whitespace in their build directory are not correctly removed when CONFIG_AUTOREMOVE is enabled. This is caused by xargs that use whitespace as delimiters. To handle this use \0 as the delimiter and set find to use \0 as the delimiter. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> (cherry picked from commit dccee21792b89031bcd801030de403f195d80278)
This commit is contained in:
parent
439e19de96
commit
ac7b1c8e94
@ -198,8 +198,8 @@ ifndef DUMP
|
|||||||
|
|
||||||
ifneq ($(CONFIG_AUTOREMOVE),)
|
ifneq ($(CONFIG_AUTOREMOVE),)
|
||||||
host-compile:
|
host-compile:
|
||||||
$(FIND) $(HOST_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' | \
|
$(FIND) $(HOST_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -print0 | \
|
||||||
$(XARGS) rm -rf
|
$(XARGS) -0 rm -rf
|
||||||
endif
|
endif
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
@ -259,8 +259,8 @@ define Build/CoreTargets
|
|||||||
ifneq ($(CONFIG_AUTOREMOVE),)
|
ifneq ($(CONFIG_AUTOREMOVE),)
|
||||||
compile:
|
compile:
|
||||||
-touch -r $(PKG_BUILD_DIR)/.built $(PKG_BUILD_DIR)/.autoremove 2>/dev/null >/dev/null
|
-touch -r $(PKG_BUILD_DIR)/.built $(PKG_BUILD_DIR)/.autoremove 2>/dev/null >/dev/null
|
||||||
$(FIND) $(PKG_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir' | \
|
$(FIND) $(PKG_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir' -print0 | \
|
||||||
$(XARGS) rm -rf
|
$(XARGS) -0 rm -rf
|
||||||
endif
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user