-
Notifications
You must be signed in to change notification settings - Fork 384
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
(tortoisegit) Skip install when the packaged version is already installed #2161
(tortoisegit) Skip install when the packaged version is already installed #2161
Conversation
✅ Package verification completed without issues. PR is now pending human review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I'll make some additional changes to this PR to get it up to date with our latest (pending) guidelines and get rid of some legacy code before I merge it in.
❌ Package verification failed, please review the Appveyor Logs and the provided Artifacts before requesting a human reviewer to take a look. |
This commit updates the package and package update script to make use of our latest recommendations by not using globbing patterns when getting the initial installer. Additionally, legacy code about the need to select the correct architecture manually has been removed as this is for much older versions of Chocolatey CLI than what we support.
61a7bbb
to
03014a1
Compare
✅ Package verification completed without issues. PR is now pending human review |
@brogers5 your changes have been merged, thanks for your contribution 👍 |
Just curious, does this update fix the Brave issue below, where Chocolatey does two version checks, the first one is incorrect and stale, as Brave auto-updates can't be disabled, so it will 100% of the time update outside of Chocolatey under normal use-case of daily browser usage. However, a secondary version check is correct, but only AFTER the time, bandwidth, and disk space has been wasted on an unnecessary download. Ideally, there should be a single, accurate version check, and only download anything if it really is necessary. This scenario may effect other software packages, but this is the situation I encounter most frequently.
|
This update is for the |
@Leif-W the first line
is letting you know that the Then Chocolatey CLI downloads and unpacks/installs the files inside the package. Then the
One check is to update the package, the other check is the package checking if the software is up to date. If you want to discuss futher, I would suggest the chat, https://ch0.co/community |
Description
This changeset implements an install-time version-check for
tortoisegit
, intended to allow package installs/upgrades to succeed when the packaged software version is already installed. This should gracefully handle both new package installs for pre-existing installations, as well as software upgrades that happen outside of Chocolatey.Motivation and Context
Fixes #2159.
I recently found myself in this situation when TortoiseGit itself prompted me to update to v2.14.0.0. Seeing an update prompt in Chocolatey-managed software normally triggers me running
choco outdated --ignore-pinned
to check if an updated package is available from the Community Repository.As no such package was available at the time, I opted to upgrade the software manually, with the understanding that I'd pick up an updated package later when it became available. When an updated package for TortoiseGit became available. I tried to upgrade and ran into the documented issue.
Implementing this for behavior consistency with some other community packages (e.g.
brave
,firefox
,flightgear
,googlechrome
,inkscape
,opera
,thunderbird
), as well as to prevent the need for workarounds (e.g. using the--skip-powershell
switch, waiting for the next package release, etc.) to get the software and package versions synchronized.How Has this Been Tested?
Environments
Dev
Chocolatey Test Environment
Steps
Create a Test Package
tortoisegit.nuspec
to fa29f72.$softwareVersion
variable intools\chocolateyInstall.ps1
to'2.13.0.1'
..\update_all.ps1 -Name tortoisegit -ForcedPackages tortoisegit
to download software installers, testupdate.ps1
changes, and create a test package based on v2.14.0.0.Clean Install Test
choco install tortoisegit --source="'.;https://community.chocolatey.org/api/v2/'"
[to prioritize local packages while sourcing dependencies from the Community Repository]).Existing Install Test
choco uninstall tortoisegit
).choco install tortoisegit --source="'.'"
).Chocolatey-Managed Upgrade Test
choco install tortoisegit --version=2.13.0.1 --allow-downgrade
).choco upgrade tortoisegit --source="'.'"
).Upgrade Catchup Test
choco install tortoisegit --version=2.13.0.1 --allow-downgrade
).git.install
package to gain access to TortoiseGit's Settings dialog (e.g.choco install git.install
).choco upgrade tortoisegit --source="'.'"
).Forced Reinstallation Test
choco install tortoisegit --source="'.'" --force --not-silent
.Screenshot (if appropriate, usually isn't needed):
N/A
Types of changes
Checklist: