chocolatey / chocolatey/choco

Unnecessarily reinstalling when updating

Open
#3,592 7 comments 0 reactions 0 assignees View on GitHub
0 - Backlog Bug
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

### Checklist

- [x] I confirm there are no unresolved issues reported on the [Chocolatey Status page](https://status.chocolatey.org).
- [x] I have verified this is the correct repository for opening this issue.
- [x] I have verified no other issues exist related to my problem.
- [x] I have verified this is not an issue for a specific package.
- [x] I have verified this issue is not security related.
- [x] I confirm I am using **official**, and **not** unofficial, or modified, Chocolatey products.

### What You Are Seeing?

When I am doing choco upgrade all:

```

You have erlang v26.2.5.5 installed. Version 27.1.2 is available based on your source(s).
[NuGet] One or more unresolved package dependency constraints detected in the Chocolatey lib folder. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'Elixir 1.17.3 constraint: erlang (>= 26.0.0 && < 27.0.0)'
Re-attempting package dependency resolution using additional available package information...
[NuGet] One or more unresolved package dependency constraints detected in the Chocolatey lib folder. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'Elixir 1.17.3 constraint: erlang (>= 26.0.0 && < 27.0.0)'
Downloading package from source 'https://community.chocolatey.org/api/v2/'
Progress: Downloading erlang 26.2.5.5... 100%

erlang v26.2.5.5 [Approved]
erlang package files upgrade completed. Performing other installation steps.
Downloading erlang 64 bit
from 'https://github.com/erlang/otp/releases/download/OTP-26.2.5.5/otp_win64_26.2.5.5.exe'
Progress: 100% - Completed download of C:\Users\user\AppData\Local\Temp\chocolatey\erlang\26.2.5.5\otp_win64_26.2.5.5.exe (145.67 MB).
Download of otp_win64_26.2.5.5.exe (145.67 MB) completed.
Hashes match.
Installing erlang...
erlang has been installed.
Added C:\ProgramData\chocolatey\bin\ct_run.exe shim pointed to 'c:\program files\erlang otp\erts-14.2.5.4\bin\ct_run.exe'.
Added C:\ProgramData\chocolatey\bin\erl.exe shim pointed to 'c:\program files\erlang otp\erts-14.2.5.4\bin\erl.exe'.
Added C:\ProgramData\chocolatey\bin\werl.exe shim pointed to 'c:\program files\erlang otp\erts-14.2.5.4\bin\werl.exe'.
Added C:\ProgramData\chocolatey\bin\erlc.exe shim pointed to 'c:\program files\erlang otp\erts-14.2.5.4\bin\erlc.exe'.
Added C:\ProgramData\chocolatey\bin\escript.exe shim pointed to 'c:\program files\erlang otp\erts-14.2.5.4\bin\escript.exe'.
Added C:\ProgramData\chocolatey\bin\dialyzer.exe shim pointed to 'c:\program files\erlang otp\erts-14.2.5.4\bin\dialyzer.exe'.
Added C:\ProgramData\chocolatey\bin\typer.exe shim pointed to 'c:\program files\erlang otp\erts-14.2.5.4\bin\typer.exe'.
The upgrade of erlang was successful.
Software installed as 'exe', install location is likely default.
```

### What is Expected?

No upgrade

### How Did You Get This To Happen?

1. Install elixir and erlang
2. choco upgrade all

### System Details

* Operating System:10.0.26100.0
* Windows PowerShell version:
Name Value
---- -----
PSVersion 5.1.26100.2161
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.26100.2161
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

* Chocolatey CLI Version:choco --version
2.4.1
* Chocolatey Licensed Extension version:choco list chocolatey.extension --exact
Chocolatey v2.4.1
0 packages installed.

Did you know Pro / Business automatically syncs with Programs and
Features? Learn more about Package Synchronizer at
https://chocolatey.org/compare
* Chocolatey License type:No
* Terminal/Emulator:WindowsTerminal

### Installed Packages

```bash
choco list
Chocolatey v2.4.1
7zip 24.9.0
7zip.install 24.9.0
adb 35.0.2
aida64-extreme 7.50.7200
androidstudio 2024.2.1.11
arduino 2.3.4
aria2 1.37.0
audacity 3.7.1
autohotkey.portable 2.0.18
autoruns 14.11.0
bitwarden 2024.12.0
blender 4.3.1
calibre 7.22.0
choco-cleaner 1.1.1
chocolatey 2.4.1
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
chocolatey-dotnetfx.extension 1.0.1
chocolatey-os-dependency.extension 0.0.1
chocolatey-visualstudio.extension 1.11.1
chocolatey-windowsupdate.extension 1.0.5
cpu-z 2.11.0.20241024
cpu-z.install 2.11.0.20241024
crystaldiskinfo 9.5.0
crystaldiskinfo.portable 9.5.0
cursoride 0.43.6
Cygwin 3.5.4
dotnet 9.0.0
dotnet-7.0-sdk 7.0.410
dotnet-7.0-sdk-4xx 7.0.410
dotnet-8.0-desktopruntime 8.0.11
dotnet-8.0-runtime 8.0.11
dotnet-9.0-desktopruntime 9.0.0
dotnet-9.0-runtime 9.0.0
dotnetcore-3.1-desktopruntime 3.1.32
dotnetcore-desktopruntime 3.1.32
dotnet-desktopruntime 9.0.0
dotnetfx 4.8.0.20220524
dotnet-runtime 9.0.0
elixir 1.17.3
emacs 29.4.0.20240806
emacs.portable 29.4.0.20240806
epicgameslauncher 1.3.128
erlang 26.2.5.5
etcher 1.18.11
exiftool 13.7.0
fd 10.2.0
ffmpeg 7.1.0
filezilla 3.68.1
FirefoxESR 128.5.2
gh 2.63.2
gimp 2.10.38.1
git 2.47.1
git.install 2.47.1
godot 4.3.0
GoogleChrome 131.0.6778.140
graalvm 22.3.5
grammarly-for-windows 1.2.120.1558
imageglass 9.2.0.1208
jetbrainstoolbox 2.5.2.35332
KB2919355 1.0.20160915
KB2919442 1.0.20160915
KB2999226 1.0.20181019
KB3033929 1.0.5
KB3035131 1.0.3
KB3063858 1.0.0
KB4019990 1.0.2
keepass 2.57.1
keepass.install 2.57.1
keepassxc 2.7.9
keeper 16.11.3
krita 5.2.6
lapce 0.3.1
line 9.2.0.3431
llvm 19.1.5
localsend.install 1.16.1
minetest 5.9.1
miniconda3 4.12.0
moonlight-qt 6.1.0
moonlight-qt.install 6.1.0
motrix 1.6.11
msys2 20241208.0.0
musescore 4.4.4.243461245
nearby-share 1.0.1637.20240207
neko 2.3.0
nextcloud-client 3.15.1
nodejs 23.4.0
nodejs.install 23.4.0
notepadplusplus 8.7.4
notepadplusplus.install 8.7.4
nushell 0.100.0
nushell.install 0.100.0
obsidian 1.7.7
octave 8.3.0.20230817
octave.install 9.3.0
parsec 20240209.0.0
pnpm 9.15.0
powertoys 0.86.0
prismlauncher 9.1.20241109
procexp 17.6.0
putty 0.82.0
putty.portable 0.82.0
python2 2.7.18
python3 3.12.6
python312 3.12.6
racket 8.15.0
raidrive 2022.6.92
rclone 1.68.2
rclone.portable 1.68.2
rpcs3 0.0.34-alpha17183
ruby 3.3.6.2
ruby.install 3.3.6.2
rufus 4.6.0
rust 1.83.0
rustdesk.install 1.2.6
ryujinx 1.1.1401
sandboxie-plus 1.15.3
sandboxie-plus.install 1.15.3
sbt 1.10.6
scala 3.5.2
spacedesk-client 2.1.23
spacedesk-server 2.1.23
spacesniffer 1.3.0.2
steam 3.10.91.91241028
tailscale 1.78.1
TcpView 4.19.0
teamviewer 15.60.3
telegram 5.9.0
telegram.install 5.9.0
Temurin11 11.0.25.9
Temurin17 17.0.13.11
Temurin17jre 17.0.13.11
Temurin21 21.0.5.11
Temurin21jre 21.0.5.11
Temurin8jre 8.432.6
tor-browser 14.0.3
typst 0.12.0
universal-adb-drivers 1.0.4
vcredist140 14.42.34433
vcredist2005 8.0.50727.619501
vcredist2008 9.0.30729.616104
vcredist2010 10.0.40219.32503
vcredist2012 11.0.61031.20230518
vcredist2013 12.0.40660.20180427
vcredist2015 14.0.24215.20170201
vcredist2017 14.16.27052
vcredist-all 1.0.1
vcxsrv 21.1.10
ventoy 1.0.99
visualstudio2022professional 117.12.2
visualstudio-installer 2.0.3
vlc 3.0.21
vlc.install 3.0.21
vnc-viewer 7.7.0
vscode 1.96.0
vscode.install 1.96.0
warp 2024.11.309
webview2-runtime 131.0.2903.86
xournalplusplus 1.2.3.1
yt-dlp 2024.12.6
zoom 6.2.11.50939
zotero 7.0.11
162 packages installed.
```

### Output Log
https://gist.github.com/mio-19/6635f593a2bf9a78177346f72dc91b45

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported sequence with Elixir and Erlang installed, then run `choco upgrade all` and review the linked output log. Trace the upgrade and dependency-resolution paths responsible for reinstalling Erlang despite the existing version; done means the command does not reinstall it when no upgrade is needed and existing tests still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.