Return early and add debug output for dependencies

This commit is contained in:
2025-07-28 23:48:14 -04:00
parent c28d7683d8
commit 3688539a90

View File

@@ -172,7 +172,8 @@ install_dependencies() {
lock_file="$BUILD_ROOT/.dependencies_ib.lock" lock_file="$BUILD_ROOT/.dependencies_ib.lock"
fi fi
if [[ ! -f $lock_file ]]; then [[ -f $lock_file ]] && debug "$lock_file lock file exists" && return 0
if [[ "$mode" == "source" ]]; then if [[ "$mode" == "source" ]]; then
# For building from source code see: # For building from source code see:
# https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem # https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem
@@ -274,7 +275,7 @@ install_dependencies() {
xz xz
zlib zlib
) ;; ) ;;
*) debug "Unsupported OS, skipping dependencies"; return 1 ;; *) debug "Unsupported OS, skipping dependency install"; return 1 ;;
esac esac
elif [[ "$mode" == "imagebuilder" ]]; then elif [[ "$mode" == "imagebuilder" ]]; then
# For Imagebuilder # For Imagebuilder
@@ -311,12 +312,11 @@ install_dependencies() {
python python
axel axel
zstd) ;; zstd) ;;
*) debug "Unsupported OS for automatic dependency install"; return 1 ;; *) debug "Unsupported OS, skipping dependency install"; return 1 ;;
esac esac
fi fi
pkg_install "${pkg_list[@]}" && echo "${pkg_list[@]}" > "$lock_file" pkg_install "${pkg_list[@]}" && echo "${pkg_list[@]}" > "$lock_file"
fi
} }
# @description Normalize release and set worktree reference # @description Normalize release and set worktree reference