mirror of
https://github.com/YunoHost-Apps/dont-code_ynh.git
synced 2024-09-03 18:26:34 +02:00
Error message when installing Mongo > 4.4 with wrong cpu
This commit is contained in:
parent
39d7218b50
commit
df44582912
2 changed files with 3 additions and 4 deletions
|
@ -5,7 +5,7 @@
|
|||
#=================================================
|
||||
java_version=17
|
||||
|
||||
mongo_version=5.0
|
||||
mongo_version=4.4
|
||||
|
||||
# Java dependencies used by the app will be installed through the Java helper
|
||||
pkg_dependencies=""
|
||||
|
|
|
@ -316,9 +316,8 @@ ynh_install_mongo() {
|
|||
# Install the version that works with the host cpu (see https://docs.mongodb.com/manual/administration/production-notes/#x86_64)
|
||||
local mongo_debian_release=$(ynh_get_debian_release)
|
||||
|
||||
if [[ $(cat /proc/cpuinfo) != *"avx"* && "$mongo_debian_release" != "buster" ]]; then
|
||||
mongo_debian_release="buster"
|
||||
ynh_print_warn --message="Installing Mongo buster version to support your cpu."
|
||||
if [[ $(cat /proc/cpuinfo) != *"avx"* && "$mongo_version" != "4.4" ]]; then
|
||||
ynh_print_error --message="The version of Mongo you're trying to install may not be compatible with your cpu (Missing avx instruction set)."
|
||||
fi
|
||||
|
||||
ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian $mongo_debian_release/mongodb-org/$mongo_version main" --package="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh" --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc"
|
||||
|
|
Loading…
Reference in a new issue