From 660e398f92472fd31dc6947f669268301c96b547 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Thu, 3 Oct 2024 00:49:10 -0400 Subject: [PATCH] prereq: add support for creating relative symlinks For targets that install symlinks, like coreutils, if the links happen to be deleted, let prereq stage be capable of creating them again with a relative path. Tested-by: Georgi Valkov # macOS Signed-off-by: Michael Pratt Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko --- include/prereq.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/prereq.mk b/include/prereq.mk index 1039c5540c..23287eade4 100644 --- a/include/prereq.mk +++ b/include/prereq.mk @@ -113,7 +113,7 @@ define SetupHostCommand [ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \ ;; \ esac; \ - ln -sf "$$$$$$$$bin" "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \ + ln -sf "$$$$$$$${bin#$(STAGING_DIR_HOST)/bin/}" "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \ exit 1; \ fi; \ fi; \