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