package-ipkg: Do not fail build without base-files
[openwrt/openwrt.git] / include / package-ipkg.mk
index 3e2e31c789e13be0c63a55726c931fd2321273a6..b9d67f5604ac15f081df8eaad616316e0f83e26b 100644 (file)
@@ -207,11 +207,13 @@ $(_endef)
                ( \
                        echo "#!/bin/sh"; \
                        echo "[ \"\$$$${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; \
+                       echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \
                        echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \
                        echo "default_postinst \$$$$0 \$$$$@"; \
                ) > postinst; \
                ( \
                        echo "#!/bin/sh"; \
+                       echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \
                        echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \
                        echo "default_prerm \$$$$0 \$$$$@"; \
                ) > prerm; \