From: Michael Pratt Date: Thu, 3 Oct 2024 04:49:10 +0000 (-0400) Subject: prereq: add support for creating relative symlinks X-Git-Tag: v25.12.0-rc1~1787 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=660e398f92472fd31dc6947f669268301c96b547;p=thirdparty%2Fopenwrt.git 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 --- diff --git a/include/prereq.mk b/include/prereq.mk index 1039c5540c6..23287eade47 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; \