my_webapp_ynh icon indicating copy to clipboard operation
my_webapp_ynh copied to clipboard

When changing PHP version, all dependencies are not reinstalled

Open fflorent opened this issue 8 months ago • 1 comments

Describe the bug

When changing PHP version through config panel, all dependencies are not reinstalled. For example, if we asked a mysql DB + PHP 8.0 during installation, when switching PHP version 8.2, php8.2-mysql is not installed.

Context

  • Hardware: N/A
  • YunoHost version: 11.2.4+202309072145
  • I have access to my server: Through SSH
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: yes
    • If yes, please explain: ynh-dev https://github.com/YunoHost/ynh-dev
  • Using, or trying to install package version/branch: I am using this branch:
  • If upgrading, current package version: can be found in the admin, or with yunohost app info $app_id

Steps to reproduce

  • yunohost app intall my_webapp
    • phpversion=8.0
    • database=mysql
  • dpkg -l | grep php8.0 gives you this:

ii php8.0 1:8.0.30-2+0~20230904.59+debian11~1.gbp806e95 all server-side, HTML-embedded scripting language (metapackage) ii php8.0-cli 1:8.0.30-2+0~20230904.59+debian11~1.gbp806e95 amd64 command-line interpreter for the PHP scripting language ii php8.0-common 1:8.0.30-2+0~20230904.59+debian11~1.gbp806e95 amd64 documentation, examples and common module for PHP ii php8.0-fpm 1:8.0.30-2+0~20230904.59+debian11~1.gbp806e95 amd64 server-side, HTML-embedded scripting language (FPM-CGI binary) ii php8.0-mysql 1:8.0.30-2+0~20230904.59+debian11~1.gbp806e95 amd64 MySQL module for PHP ii php8.0-opcache 1:8.0.30-2+0~20230904.59+debian11~1.gbp806e95 amd64 Zend OpCache module for PHP ii php8.0-readline 1:8.0.30-2+0~20230904.59+debian11~1.gbp806e95 amd64 readline module for PHP

  • Change phpversion to 8.2 through commandline or admin panel
  • dpkg -l | grep php8.2 does not list php8.2-mysql.

Expected behavior

php8.2-mysql should have been installed.

Logs

When an operation fails, YunoHost provides a simple way to share the logs.

  • In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.
  • In command line, the command to share the logs is displayed at the end of the operation and looks like yunohost log display [log name] --share. If you missed it, you can find the log ID of a previous operation using yunohost log list.

After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)

If applicable and useful, add screenshots to help explain your problem.

fflorent avatar Oct 15 '23 08:10 fflorent