소스 검색

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 <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/16865
Signed-off-by: Christian Marangi <[email protected]>
Daniel Golle 1 년 전
부모
커밋
21b5ac862e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      include/rootfs.mk

+ 1 - 1
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; \