mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Update upgrade: fix inconsistent handling of the php version stuff between major upgrades
This commit is contained in:
parent
3259e4abb5
commit
5932bdc22f
1 changed files with 6 additions and 2 deletions
|
@ -107,7 +107,7 @@ exec_occ() {
|
||||||
# Backward compatibility to upgrade from older versions
|
# Backward compatibility to upgrade from older versions
|
||||||
if [ $current_major_version = "last" ] || [ $current_major_version -ge 26 ]
|
if [ $current_major_version = "last" ] || [ $current_major_version -ge 26 ]
|
||||||
then
|
then
|
||||||
NEXTCLOUD_PHP_VERSION=$phpversion
|
NEXTCLOUD_PHP_VERSION="8.2"
|
||||||
elif [ $current_major_version -ge 24 ]
|
elif [ $current_major_version -ge 24 ]
|
||||||
then
|
then
|
||||||
NEXTCLOUD_PHP_VERSION="8.1"
|
NEXTCLOUD_PHP_VERSION="8.1"
|
||||||
|
@ -117,7 +117,11 @@ exec_occ() {
|
||||||
else
|
else
|
||||||
NEXTCLOUD_PHP_VERSION="7.1"
|
NEXTCLOUD_PHP_VERSION="7.1"
|
||||||
fi
|
fi
|
||||||
if ! timeout 1 php$NEXTCLOUD_PHP_VERSION 2>/dev/null; then
|
|
||||||
|
# NB : be super careful when designing this part of the code, because calling ynh_install_app_dependencies
|
||||||
|
# will do magic regarding php configuration and $phpversion when the php version of the dependencies changes ...
|
||||||
|
phpversion=$(ynh_app_setting_set --app=$app --key=phpversion)
|
||||||
|
if [[ "$NEXTCLOUD_PHP_VERSION" != "$phpversion" ]; then
|
||||||
local pkg_dependencies="$(dpkg-query --show --showformat='${Depends}' ${app}-ynh-deps)"
|
local pkg_dependencies="$(dpkg-query --show --showformat='${Depends}' ${app}-ynh-deps)"
|
||||||
pkg_dependencies="${pkg_dependencies//$phpversion/$NEXTCLOUD_PHP_VERSION}"
|
pkg_dependencies="${pkg_dependencies//$phpversion/$NEXTCLOUD_PHP_VERSION}"
|
||||||
ynh_install_app_dependencies "$pkg_dependencies"
|
ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
|
|
Loading…
Add table
Reference in a new issue