diff options
author | Adrien Ferrand <adferrand@users.noreply.github.com> | 2021-05-17 20:22:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-17 20:22:47 +0300 |
commit | 352ee258b70290409a8a97494d35a29758bd85b4 (patch) | |
tree | 35da4e48a25fcd7057bbe8ad44ed6f81d6301415 /windows-installer | |
parent | 5040495741ee924052eb2da3f43e55970a4e1200 (diff) |
[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>
Diffstat (limited to 'windows-installer')
-rw-r--r-- | windows-installer/assets/template.nsi | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/windows-installer/assets/template.nsi b/windows-installer/assets/template.nsi index 566e1b004..5c551729a 100644 --- a/windows-installer/assets/template.nsi +++ b/windows-installer/assets/template.nsi @@ -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} |