Browse Source

build-package: stop build if buildorder.py returns error

android-5
Henrik Grimler 6 years ago
committed by Leonid Plyushch
parent
commit
46e7252e91
  1. 8
      scripts/build/termux_step_start_build.sh

8
scripts/build/termux_step_start_build.sh

@ -19,6 +19,8 @@ termux_step_start_build() {
while read PKG PKG_DIR; do while read PKG PKG_DIR; do
if [ -z $PKG ]; then if [ -z $PKG ]; then
continue continue
elif [ "$PKG" = "ERROR" ]; then
termux_error_exit "Obtaining buildorder failed"
fi fi
# llvm doesn't build if ndk-sysroot is installed: # llvm doesn't build if ndk-sysroot is installed:
if [ "$PKG" = "ndk-sysroot" ]; then continue; fi if [ "$PKG" = "ndk-sysroot" ]; then continue; fi
@ -51,17 +53,19 @@ termux_step_start_build() {
fi fi
mkdir -p /data/data/.built-packages mkdir -p /data/data/.built-packages
echo "$DEP_VERSION" > "/data/data/.built-packages/$PKG" 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 elif [ "$TERMUX_SKIP_DEPCHECK" = false ] && [ "$TERMUX_INSTALL_DEPS" = false ]; then
# Build dependencies # Build dependencies
while read PKG PKG_DIR; do while read PKG PKG_DIR; do
if [ -z $PKG ]; then if [ -z $PKG ]; then
continue continue
elif [ "$PKG" = "ERROR" ]; then
termux_error_exit "Obtaining buildorder failed"
fi fi
echo "Building dependency $PKG if necessary..." echo "Building dependency $PKG if necessary..."
# Built dependencies are put in the default TERMUX_DEBDIR instead of the specified one # Built dependencies are put in the default TERMUX_DEBDIR instead of the specified one
./build-package.sh -a $TERMUX_ARCH -s "${PKG_DIR}" ./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 fi
TERMUX_PKG_FULLVERSION=$TERMUX_PKG_VERSION TERMUX_PKG_FULLVERSION=$TERMUX_PKG_VERSION

Loading…
Cancel
Save