[openwrt/openwrt] build: set PATH for post-install scripts
LEDE Commits
lede-commits at lists.infradead.org
Tue Nov 5 02:22:13 PST 2024
ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/21b5ac862eed7ac373361c914cf6098cab04f503
commit 21b5ac862eed7ac373361c914cf6098cab04f503
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Nov 5 03:05:31 2024 +0000
build: set PATH for post-install scripts
post-install scripts may need to call executables installed to
STAGING_DIR_HOSTPKG which is not part of the PATH set to TARGET_PATH in
rules.mk.
Set PATH for post-install scripts to TARGET_PATH_PKG.
Signed-off-by: Daniel Golle <daniel at makrotopia.org>
Link: https://github.com/openwrt/openwrt/pull/16865
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
include/rootfs.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/rootfs.mk b/include/rootfs.mk
index e6cadc531d..ff7fd185fe 100644
--- a/include/rootfs.mk
+++ b/include/rootfs.mk
@@ -84,7 +84,7 @@ define prepare_rootfs
IPKG_POSTINST_PATH=./usr/lib/opkg/info/*.postinst; \
fi; \
for script in $$IPKG_POSTINST_PATH; do \
- IPKG_INSTROOT=$(1) $$(command -v bash) $$script; \
+ PATH="$(TARGET_PATH_PKG)" IPKG_INSTROOT=$(1) $$(command -v bash) $$script; \
ret=$$?; \
if [ $$ret -ne 0 ]; then \
echo "postinst script $$script has failed with exit code $$ret" >&2; \
More information about the lede-commits
mailing list