-
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
Allow upgrading a pinned package without removing the pin beforehand #2050
Comments
I think this may already be an issue? Or at least something related like install with pin. |
Hear, Hear! At the least, it would be nice if the documentation for pinning explicitly stated that there is no way to temporarily bypass the pin. One can only manually remove the pin, upgrade and repin. Notwithstanding my asking for more, Chocolatey is really good. Thank you. |
@ferventcoder is there any progress with that feature ? |
The Chocolatey docs specifically recommend using pin as a solution for auto-updating apps like Firefox and Chrome, as apparently auto synching doesn't work for package updates. Yet that leaves no way to manually roll out packages updates to the hosts that don't keep those auto-updating applications constantly open. I don't understand why pinning doesn't just only prevent "choco upgrade all", or hide the package in "choco outdated". Preventing the package from updating at all is a poor solution especially when there's no administrative way to just issue a package upgrade without fiddling around with toggling the pin off and on again. |
@nascentt how about using |
strange, I don't see upgradeAllExceptions mentioned at all in I guess neither solution really fixes the underlying issue that choco sync doesn't work for version changes, which should really be fixed. I do still believe choco upgrade should have a switch to ignore pins the same way choco outdated does though. For both preventing hacky workaround like disable;upgrade;enable, but also consistency. regarding the name, as choco upgrade has -ignore-pinned I feel the name of the switch on choco upgrade should be the same
|
Whoops, sorry that should be |
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This commit adds a simple unit test to verify that the --ignore-pin option appears in the OptionSet that is generated.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This commit adds a simple unit test to verify that the --ignore-pin option appears in the OptionSet that is generated.
This adds a switch to the upgrade command to bypass/ignore any pinned packages. It will write out a warning message if a pinned package is being upgraded. The package will remain pinned after the upgrade completes, although pinned to the new version.
This commit adds a simple unit test to verify that the --ignore-pin option appears in the OptionSet that is generated.
In order to be consistent with an existing option on the |
(#2050) Upgrade add parameter to ignore pins
In a previous commit (fb22630) a change was made to remove the pinned source dependencies from the list of available packages only when we are not ignoring pinned packages. While this change was valid, it forgot to populate the removedSources property with the results of the call to RemovePinnedSourceDependencies. This was an oversight, and although the change was tested locally, a complete execution of all the integration tests was not performed, which would have caught this problem.
With the next release of Chocolatey CLI, it is possible to run choco upgrade --ignore-pinned, rather than first having to run a choco pin remove command. This commit adds a Pester test to cover the usage of the --ignore-pinned option on the upgrade command. This tests relies on correct execution of the --pin option on the install command, but this is tested elsewhere.
With the next release of Chocolatey CLI, it is possible to run choco upgrade --ignore-pinned, rather than first having to run a choco pin remove command. This commit adds a Pester test to cover the usage of the --ignore-pinned option on the upgrade command. This tests relies on correct execution of the --pin option on the install command, but this is tested elsewhere.
With the next release of Chocolatey CLI, it is possible to run choco upgrade --ignore-pinned, rather than first having to run a choco pin remove command. This commit adds a Pester test to cover the usage of the --ignore-pinned option on the upgrade command. This tests relies on correct execution of the --pin option on the install command, but this is tested elsewhere.
With the next release of Chocolatey CLI, it is possible to run choco upgrade --ignore-pinned, rather than first having to run a choco pin remove command. This commit adds a Pester test to cover the usage of the --ignore-pinned option on the upgrade command. This tests relies on correct execution of the --pin option on the install command, but this is tested elsewhere.
With the next release of Chocolatey CLI, it is possible to run choco upgrade --ignore-pinned, rather than first having to run a choco pin remove command. This commit adds a Pester test to cover the usage of the --ignore-pinned option on the upgrade command. This tests relies on correct execution of the --pin option on the install command, but this is tested elsewhere.
* release/2.3.0: (153 commits) (#23) Move call to SetRemotePackageNamesIfAllSpecified (#1901) Revert commit to display location (maint) Update Authenticode Signature (tests) Some minor tweaks for test consistency (#310) Set-EnvironmentVariable: delete values properly (tests) Remove v2 import tests (#310) Fix test issues (#310) Fixup v2 compatibility (tests) Working on tests during pairing session (#2050) Add Pester test for --ignore-pinned option (#3381) Add Pester tests for rule command (#1144) Add Pester test to cover hash validation (#72) Add Pester tests to cover new functionality (test) Update assertions for push commands (#1310) Add Pester test to validate output (#23) Add tests to handle install all (#2200) Add test for new enhanced exit code (#1764) Add test for new enhanced exit code (#1760) Add test for new enhanced exit code (#1759) Add test for new enhanced exit code ...
🎉 This issue has been resolved in version 2.3.0 🎉 The release is available on: Your GitReleaseManager bot 📦 🚀 |
* master: (37 commits) (#310) Fix path to chocolatey.lib files (maint) Corrected casing of file (#23) Move call to SetRemotePackageNamesIfAllSpecified (#1901) Revert commit to display location (maint) Update Authenticode Signature (tests) Some minor tweaks for test consistency (#310) Set-EnvironmentVariable: delete values properly (tests) Remove v2 import tests (#310) Fix test issues (#310) Fixup v2 compatibility (tests) Working on tests during pairing session (#2050) Add Pester test for --ignore-pinned option (#3381) Add Pester tests for rule command (#1144) Add Pester test to cover hash validation (#72) Add Pester tests to cover new functionality (test) Update assertions for push commands (#1310) Add Pester test to validate output (#23) Add tests to handle install all (#2200) Add test for new enhanced exit code (#1764) Add test for new enhanced exit code ...
…evelop * 'develop' of https://github.com/josh-cooley/choco: (145 commits) (maint) Add CODEOWNERS files (build) Add templated notifications to all builds (build) Add verification of source scripts (doc) Further tweak docgen for Chocolatey.PowerShell (doc) Tweak docgen for Chocolatey.PowerShell (chocolatey#3446) Update GenerateDocs.ps1 (chocolatey#3307) Do not create Tools directory from MSI (maint) Do not create Chocolatey directory in MSI (chocolatey#310) Fix path to chocolatey.lib files (maint) Corrected casing of file (chocolatey#23) Move call to SetRemotePackageNamesIfAllSpecified (chocolatey#1901) Revert commit to display location (maint) Update Authenticode Signature (tests) Some minor tweaks for test consistency (chocolatey#310) Set-EnvironmentVariable: delete values properly (tests) Remove v2 import tests (chocolatey#310) Fix test issues (chocolatey#310) Fixup v2 compatibility (tests) Working on tests during pairing session (chocolatey#2050) Add Pester test for --ignore-pinned option ...
Motivation
I've pinned
powershell-core
because you mess up if you upgrade PowerShell Core in PowerShell Core.So when I have to upgrade PowerShell Core, I have to remove pin and upgrade and add pin again.
Specifically, I follow this procedure:
choco upgrade all
in PowerShell Corethis package is pinned
warning message)choco pin remove -n=powershell-core
in Powershellchoco upgrade powershell-core
in Powershellchoco pin add -n=powershell-core
in PowershellThe point is someone uses pin for delay upgrades, not to block upgrades forever.
Solution
Add a switch
--disable-pin
to upgrade.When this switch is enabled, pinned packages will be upgraded.
choco upgrade powershell-core --disable-pin
has same effect with the above procedure 4-6.Other suggestions
Switch name could be
--ignore-pin
--exclude-pin
--disable-pin-once
The text was updated successfully, but these errors were encountered: