Separate dependency lock files
This commit is contained in:
@@ -153,12 +153,17 @@ parse_input() {
|
||||
|
||||
install_dependencies() {
|
||||
debug "${FUNCNAME[0]}"
|
||||
local lock_file="$BUILDROOT/.dependencies"
|
||||
local -a pkg_list
|
||||
|
||||
# TODO please contribute your platform here
|
||||
local lock_file
|
||||
if ((FROM_SOURCE)); then
|
||||
# For building from source with make
|
||||
lock_file="$BUILDROOT/.dependencies_sc"
|
||||
else
|
||||
lock_file="$BUILDROOT/.dependencies_ib"
|
||||
fi
|
||||
|
||||
if [[ ! -f $lock_file ]]; then
|
||||
if ((FROM_SOURCE)); then
|
||||
# For building from source code
|
||||
# https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem
|
||||
case "$ID" in
|
||||
fedora|centos)
|
||||
@@ -304,9 +309,7 @@ install_dependencies() {
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Skip dependency installation if lock file is present
|
||||
[[ -f $lock_file ]] && return
|
||||
fi
|
||||
|
||||
pkg_install "${pkg_list[@]}" && echo "${pkg_list[@]}" > "$lock_file"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user