1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-26 07:41:33 +03:00

[Windows] Cleanup Certbot pkg dir before installing to avoid dependencies conflicts (#8836)

Fixes #8824

This PR makes the installer first delete (if exist) the previous `pkg` directory in the Certbot installation in order to avoid dependencies conflicts when a new version of Certbot (with new versions of dependencies) is intaller other an existing one.

I took the simplest approach here, which is to delete specifically the directories known to create conflicts, instead of more complex approaches that involve to factor in some way the complete uninstaller logic. This is because the complexity added without a clear improvement does not worth it in my opinion. More specifically:
* factorizing in some way the uninstaller section in the NSIS template make the installer use any potential new logic of a new installation of Certbot instead of the one applying for the current installation, and may create unexpected errors during installation or at runtime
* calling the existing `uninstaller.exe` would be better, but I could not find a proper way to let NSIS wait for the actual end of the uninstall logic, and again may create unexpected errors during installation or at runtime

* Cleanup Certbot pkg dir before installing to avoid dependencies conflicts

* Add a changelog

Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
This commit is contained in:
Adrien Ferrand
2021-05-17 19:22:47 +02:00
committed by GitHub
parent 5040495741
commit 352ee258b7
2 changed files with 7 additions and 0 deletions

View File

@@ -11,6 +11,8 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
### Changed
* DNS plugins based on lexicon now require dns-lexicon >= v3.1.0
* Windows installer now cleans up old Certbot dependency packages
before installing the new ones to avoid version conflicts.
### Fixed

View File

@@ -83,6 +83,11 @@ SectionEnd
[% block sections %]
Section "!${PRODUCT_NAME}" sec_app
; CERTBOT CUSTOM BEGIN
; Try to cleanup Certbot pkg directory to avoid dependencies conflicts
RMDir /r "$INSTDIR\pkgs"
; CERTBOT CUSTOM END
SetRegView [[ib.py_bitness]]
SectionIn RO
File ${PRODUCT_ICON}