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