Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[strawberryperl] Upgrade issue #13

Open
Thilas opened this issue Jun 10, 2019 · 7 comments
Open

[strawberryperl] Upgrade issue #13

Thilas opened this issue Jun 10, 2019 · 7 comments
Labels

Comments

@Thilas
Copy link
Owner

Thilas commented Jun 10, 2019

Issue raised on Chocolatey by Tyler Szabo:

Attempting to upgrade this package will fail unless the previous version is explicitly uninstalled. Looking at the logs (added /l*v c:\StrawberryPerl_msi_install.log to the msiexec args per the error code's suggestion):

Already installed version of Strawberry Perl (64-bit) cannot be upgraded; it has to be uninstalled first.
Action ended 16:41:34: CA_UninstallOldVersion. Return value 3.
Action ended 16:41:35: INSTALL. Return value 3.

This is especially confusing in that after failed upgrading chocolatey will no longer show strawberryperl as installed even though the old version is still installed, requiring using add/remove programs.

It looks like this issue has been reported before, but the root cause wasn't diagnosed.

@Thilas
Copy link
Owner Author

Thilas commented Jun 10, 2019

Here is an additional message to help reproduce:

This appears to happen during upgrade. You can induce it by explicitly installing an older version then upgrading.

Broken:

choco install strawberryperl --version 5.28.2.1
choco upgrade strawberryperl --version 5.30.0.1

Working:

choco install strawberryperl --version 5.28.2.1
MsiExec.exe /X{FFFA4206-7CDD-1014-8B25-CEB51AB4960F} /passive /norestart
choco upgrade strawberryperl --version 5.30.0.1

@Thilas Thilas added the bug label Jun 10, 2019
@Thilas
Copy link
Owner Author

Thilas commented Jun 10, 2019

Thanks for the investigation. One remark though: when trying to upgrade Strawberry Perl, it still shows as installed on Chocolatey in my tests despite the failure.

Anyway, I am not sure what to do here. Is it safe to always uninstall Strawberry Perl before upgrading? Or should we just show a specific error to help users? Any ideas?

@tylerszabo
Copy link

I do know other installers will uninstall previous versions first (VLC, for instance does this). I think putting an uninstall action in chocolateyBeforeModify.ps1 would allow it to proceed.

It looks like the decision to force uninstall before installing a new version is pretty explicit (see: https://github.com/StrawberryPerl/Perl-Dist-Strawberry/blob/8f666f361456d65bd35fede142318326c5469907/share/msi/MSI_main-v2.wxs.tt CA_UninstallOldVersion).

Given that when using the Chocolatey package you're expecting Chocolatey to handle thing (and you're not likely mucking about with it) it I'd say it's probably more expected that the package will preform the Uninstall.

@Thilas Thilas self-assigned this Jun 11, 2019
@Thilas
Copy link
Owner Author

Thilas commented Jun 11, 2019

But then what about installed modules or other configuration? I'm afraid users will loose stuff if Chocolatey always uninstalls Strawberry Perl before any upgrades. And it's probably the reason behind the installer current behavior, don't you think?

Otherwise, I was thinking about using the zip (or portable) package instead of the msi one. But I'm not sure of the upgrade procedure anyway. Any thoughts?

I agree with you that the Chocolatey package should handle upgrades but I just don't want to rush into that

Thanks for your help on this because I don't use much Strawberry Perl.

@tylerszabo
Copy link

tylerszabo commented Jun 11, 2019

That's a good point; if someone's using it as their default Perl (I use it as a dependency for ack), then changes there will be lost.

This might be something to have handled upstream: https://rt.cpan.org/Public/Dist/Display.html?Name=Perl-Dist-Strawberry

@tylerszabo
Copy link

Aha! They have a mailing list - http://strawberryperl.com/support.html. Perhaps there's a known-good way to handle this. So far this is the what I've found; I'm not sure how relevant it is: https://www.mail-archive.com/win32-vanilla@perl.org/msg00394.html

@Thilas Thilas changed the title Upgrade issue with Strawberry Perl [strawberryperl] Upgrade issue Jun 12, 2019
@Thilas Thilas removed their assignment Jan 30, 2020
@Thilas
Copy link
Owner Author

Thilas commented Dec 27, 2020

From what I understand from https://github.com/StrawberryPerl/Perl-Dist-Strawberry/blob/master/share/msi/MSI_main-v2.wxs.tt, it looks like this is the expected behavior: the setup does not support upgrade, only new install.

I'll open an issue there and see if this is something that could be handled by the MSI setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants