From 2273e3f2a2a1c78faac78f85e92947bb001e4bfe Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Sun, 3 Mar 2019 10:29:05 +0100 Subject: [PATCH] build-package: stop build if buildorder.py returns error --- scripts/build/termux_step_start_build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/build/termux_step_start_build.sh b/scripts/build/termux_step_start_build.sh index e9d94066b..5c5933363 100644 --- a/scripts/build/termux_step_start_build.sh +++ b/scripts/build/termux_step_start_build.sh @@ -19,6 +19,8 @@ termux_step_start_build() { while read PKG PKG_DIR; do if [ -z $PKG ]; then continue + elif [ "$PKG" = "ERROR" ]; then + termux_error_exit "Obtaining buildorder failed" fi # llvm doesn't build if ndk-sysroot is installed: if [ "$PKG" = "ndk-sysroot" ]; then continue; fi @@ -51,17 +53,19 @@ termux_step_start_build() { fi mkdir -p /data/data/.built-packages echo "$DEP_VERSION" > "/data/data/.built-packages/$PKG" - done<<<$(./scripts/buildorder.py -i "$TERMUX_PKG_BUILDER_DIR" $TERMUX_PACKAGES_DIRECTORIES) + done<<<$(./scripts/buildorder.py -i "$TERMUX_PKG_BUILDER_DIR" $TERMUX_PACKAGES_DIRECTORIES || echo "ERROR") elif [ "$TERMUX_SKIP_DEPCHECK" = false ] && [ "$TERMUX_INSTALL_DEPS" = false ]; then # Build dependencies while read PKG PKG_DIR; do if [ -z $PKG ]; then continue + elif [ "$PKG" = "ERROR" ]; then + termux_error_exit "Obtaining buildorder failed" fi echo "Building dependency $PKG if necessary..." # Built dependencies are put in the default TERMUX_DEBDIR instead of the specified one ./build-package.sh -a $TERMUX_ARCH -s "${PKG_DIR}" - done<<<$(./scripts/buildorder.py "$TERMUX_PKG_BUILDER_DIR" $TERMUX_PACKAGES_DIRECTORIES) + done<<<$(./scripts/buildorder.py "$TERMUX_PKG_BUILDER_DIR" $TERMUX_PACKAGES_DIRECTORIES || echo "ERROR") fi TERMUX_PKG_FULLVERSION=$TERMUX_PKG_VERSION