Closed softwarecreations closed 5 months ago
Attention: Patch coverage is 0%
with 2 lines
in your changes are missing coverage. Please review.
Project coverage is 54.40%. Comparing base (
715a5e3
) to head (7dcf69b
). Report is 1 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
modoboa_installer/package.py | 0.00% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@softwarecreations The installer is supposed to be run on a fresh server...
@tonioo I see that you're saying that now. But installer has an upgrade option... that implies that you can upgrade an existing server. It doesn't say anywhere in the Readme that the installer must be run on a fresh server with nothing on it. I am not arguing with you, I'm just saying that was not clear.
Likely common scenario Regardless, reality is that people will try run the installer on a server that already has something on it. Even something like nginx is used by countless projects and web-services.
Best way forward? I think it's good that the installer tells apt to use the package-maintainer's config files. What is the harm in that? Without telling apt your preference, the installer crashes if an old config file is found. What I discovered when I told apt to use the package-maintainer's config files, is that the old config files were simply renamed (not deleted) so there was no real harm. The end result was a working installation rather than a crashed installer.
By the way I did solve my problem shown in the screenshot. Unrelated to this conversation. The installer was behaving badly until I deleted my old config file.
Fixes apt-get install when package already exists with an old config file. The updated code automatically installs the package-maintainer's version of any config files that come with the package.
Resolves issue Upgrade freezes while installing nginx #538
Steps to reproduce
./run.py --upgrade <your domain>
BeforeThis is the reason
![image](https://github.com/modoboa/modoboa-installer/assets/28704571/021c90d6-4043-403e-a3e5-d133f9419a0d)
After my patch I restored the VM to the point prior to the attempted upgrade. Re-attempt the upgrade. nginx installs successfully!![image](https://github.com/modoboa/modoboa-installer/assets/28704571/95d4d2d4-1425-45d0-a5ac-86b45108f4cf)