From 56c74132ce3466da7b85752ad451fcfd55913ff2 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Mon, 30 Sep 2024 15:59:06 -0400 Subject: [PATCH] tools/coreutils: disable uninstall target GNU coreutils is a unique case where we require some of the utilities on the host machine before anything is built. The prerequisite is handled by symlinks to the host binaries in the staging directory that are installed by the build system and that are expected to remain as long as the corresponding stampfile exists. Because the binaries built by coreutils will replace the symlinks, the uninstall target will actually delete the symlinks long before the build finishes whenever it is ran. This can cause the utilities to be temporarily missing from the controlled part of the shell's PATH, so disable the removal of the coreutils utilities. The appropriate way to clear all of the programs and links would be `make dirclean`. Tested-by: Georgi Valkov # macOS Signed-off-by: Michael Pratt Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko (cherry picked from commit 5c832d783381831289c4f65d2a821a0eecfc435f) [also drop the removal of install, which 6a3cfeb4a6 removes upstream] Signed-off-by: Josef Schlehofer Link: https://github.com/openwrt/openwrt/pull/25363 Signed-off-by: Hauke Mehrtens --- tools/coreutils/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/coreutils/Makefile b/tools/coreutils/Makefile index 73b95912ee1..c7814e421e4 100644 --- a/tools/coreutils/Makefile +++ b/tools/coreutils/Makefile @@ -67,8 +67,7 @@ define Host/Install endef define Host/Uninstall - rm -f $(STAGING_DIR_HOST)/bin/install - -$(call Host/Compile/Default,uninstall) + #$(call Host/Compile/Default,uninstall) # Removes necessary symlinks endef $(eval $(call HostBuild))