-
Notifications
You must be signed in to change notification settings - Fork 905
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
upgrade - remove automation scripts prior to upgrade even if changed #1689
Comments
ferventcoder
changed the title
On upgrade, Chocolatey should remove automation scripts even if changed
upgrade - remove automation scripts prior to upgrade even if changed
Dec 5, 2018
On upgrade, the script was not replaced. This is because the script in the nupkg was removed during install/upgrade with Package Reducer turned on and therefore the nuget uninstallation that would have pulled it doesn't see it for detection and removal. So it does need to be handled as part of the upgrade steps in choco. |
ferventcoder
changed the title
upgrade - remove automation scripts prior to upgrade even if changed
upgrade - remove automation scripts prior to upgrade even if changed
Dec 5, 2018
gep13
added a commit
to gep13/choco
that referenced
this issue
Mar 12, 2019
It is possible, due to the way that Package Reducer works, that there are extra files left in the package directory when doing an upgrade of a package. This can cause a package upgrade to fail. Prior to performing the upgrade, delete all packaging scripts (chocolateyInstall, chocolateyUninstall, and chocolateyBeforeModify) from the package folder, these will then be replaced during the upgrade, if they are still required..
gep13
added a commit
to gep13/choco
that referenced
this issue
Mar 13, 2019
It is possible, due to the way that Package Reducer works, that there are extra files left in the package directory when doing an upgrade of a package. This can cause a package upgrade to fail. Prior to performing the upgrade, delete all packaging scripts (chocolateyInstall, chocolateyUninstall, and chocolateyBeforeModify) from the package folder, these will then be replaced during the upgrade, if they are still required..
ferventcoder
pushed a commit
that referenced
this issue
Mar 13, 2019
It is possible, due to the way that Package Reducer works, that there are extra files left in the package directory when doing an upgrade of a package. This can cause a package upgrade to fail. Prior to performing the upgrade, delete all packaging scripts (chocolateyInstall, chocolateyUninstall, and chocolateyBeforeModify) from the package folder, these will then be replaced during the upgrade, if they are still required..
ferventcoder
added a commit
that referenced
this issue
Mar 13, 2019
* pr1751: (maint) Corrected whitespace (GH-1689) Delete packaging scripts before upgrade
ferventcoder
added a commit
that referenced
this issue
Mar 13, 2019
* stable: (maint) Corrected whitespace (GH-1689) Delete packaging scripts before upgrade (doc) fix grammar in scripting guidelines (doc) add don't use nupkg to scripting guidelines (maint) fix typo (GH-1602) exit 2 on items outdated (doc) add step for rebasing prior to merging (GH-1614) Quote source name if includes pipe
This has been completed and will be released with Chocolatey v0.10.12. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tl;dr - Package Reducer causes this behavior because of removing files from the nupkg to reduce the size. Let's fix it so that it no longer does this.
What You Are Seeing?
An upgrade appears to be using an old chocolateyInstall.ps1 after a newer version removed the need for the script. This means the file would not have been overwritten, but should have been removed since it was changed.
What is Expected?
Files that have not been changed from the older nupkg installation should be removed.
How Did You Get This To Happen? (Steps to Reproduce)
Turn on Package Reducer (no more files in the older nupkg to compare to).
Install
transifex-client
version 0.12.4. Note it has a chocolateyInstall.ps1. Then upgrade to 0.13.2 (note it does not have a chocolateyInstall.ps1).See it fail because it did not remove the file.
Output Log
Full Log Output
The text was updated successfully, but these errors were encountered: