mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Merge pull request #652 from YunoHost-Apps/fix-php-apt-dependency-confusion-during-upgrade
Fix PHP/APT dependency confusion when upgrading through many versions
This commit is contained in:
commit
53aa80eb8d
1 changed files with 4 additions and 0 deletions
|
@ -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" \
|
||||
|
|
Loading…
Add table
Reference in a new issue