diff --git a/scripts/upgrade b/scripts/upgrade index 280eb7d..582158c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -56,6 +56,10 @@ exec_occ() { if [[ "$NEXTCLOUD_PHP_VERSION" != "$phpversion" ]]; then local pkg_dependencies="$(dpkg-query --show --showformat='${Depends}' ${app}-ynh-deps)" pkg_dependencies="${pkg_dependencies//$phpversion/$NEXTCLOUD_PHP_VERSION}" + # Packaging v1 ~legacy : ynh_install_app_dependencies is designed to be called several times + # but the second time it will *append* the list of dependencies rather than replace the existing dependencies + # resulting in a crash when parsing what's the php version the app uses, hence we need to force the full-replacement + YNH_INSTALL_APP_DEPENDENCIES_REPLACE=true ynh_install_app_dependencies "$pkg_dependencies" fi (cd "$install_dir" && ynh_exec_as "$app" \