chocolatey / chocolatey/choco

`choco upgrade` repeatedly downloads and installs the same package

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

Description

### Checklist

- [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?

If i run `choco upgrade vlc vlc.install`, it downloads and installs vlc.install 3.0.19.

### What is Expected?

choco should output something like `vlc.installis not installed and skip non-installed option selected. Skipping...`, like it does for other packages.

### How Did You Get This To Happen?

1. I run `choco upgrade vlc vlc.install`
2. Choco downloads and installs vlc.install 3.0.19.
3. I run `choco upgrade vlc vlc.install`
4. Choco downloads again and installs again vlc.install 3.0.19.

### System Details

* Operating System: 10.0.22631.0
* Windows PowerShell version: 7.3.9 Core
* Chocolatey CLI Version: 2.2.2
* Chocolatey Licensed Extension version: Chocolatey v2.2.2
* Chocolatey License type: None
* Terminal/Emulator: Microsoft Terminal

### Installed Packages

```bash
Chocolatey v2.2.2
7zip 23.1.0
7zip.install 23.1.0
adb 34.0.1.20230514
autohotkey 1.1.37.1
autohotkey.install 1.1.37.1
autohotkey.portable 2.0.10
blender 3.6.4
chocolatey 2.2.2
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
chocolatey-dotnetfx.extension 1.0.1
chocolatey-fastanswers.extension 0.0.2.2
chocolatey-font-helpers.extension 0.0.4
chocolatey-os-dependency.extension 0.0.1
chocolatey-visualstudio.extension 1.11.1
chocolatey-windowsupdate.extension 1.0.5
chromium 119.0.6045.106
dependency-scanner 0.2.0.1
diff-pdf 0.5.1
dnspyex 6.4.1
DotNet4.5 4.5.20120822
DotNet4.5.2 4.5.2.20140902
DotNet4.6.1 4.6.1055.20170308
dotnet-7.0-desktopruntime 7.0.13
dotnet-desktopruntime 7.0.13
dotnetfx 4.8.0.20220524
Everything 1.4.11024
gimp 2.10.34.2
gsudo 2.4.0
gtypist 2.9.5
h2testw 1.4.20180717
helix 23.10.0
insomnia-designer 2020.5.2
insomnia-rest-api-client 2023.8.3
intel-graphics-driver 31.0.101.3790
intellijidea-community 2023.2.4
intunewinapputil 1.8.4.20220726
javaruntime 8.0.391
jetbrainsmono 2.304.0
jre8 8.0.391
KB2919355 1.0.20160915
KB2919442 1.0.20160915
KB2999226 1.0.20181019
KB3033929 1.0.5
KB3035131 1.0.3
KB3063858 1.0.0
KB3118401 1.0.5
keepassxc 2.7.6
languagetool 6.2.0
Lazydocker 0.23.1
libreoffice-fresh 7.6.2
mailslurper 1.14.1
master-pdf-editor 5.9.40
microsoft-teams 1.6.0.27573
miktex.install 23.10.12
netfx-4.7.2 4.7.2
nmap 7.93.0
NSwagStudio 13.20.0
nuget.commandline 6.7.0
okular 23.8.2
onenote 16.0.15330.20246
opensans 2.10.0
pdf24 11.14.0
pdftk 2.2.0
PowerShell 5.1.14409.20180811
powershell-core 7.3.9
powertoys 0.75.1
programmer-dvorak 1.2.8
resharper-platform 232.0.20230919.80434
resharper-ultimate-all 2023.2.2
RobotoFonts 4.0.0.1
rufus 4.3.0
shutup10 1.9.1436
spicetify-cli 2.25.3
sublimemerge 0.0.2083
sysinternals 2023.10.18
texstudio.install 4.6.3
thunderbird 115.4.1
tipp10 2.1.0.20170126
tomighty 0.7.1.300
uefitool 0.28.0
vagrant 2.4.0
Vale 2.29.6
vcredist140 14.36.32532
vcredist2008 9.0.30729.616104
vcredist2010 10.0.40219.32503
vcredist2017 14.16.27033
vcxsrv 1.20.14
ventoy 1.0.96
virtualbox 7.0.12
visualstudio-installer 2.0.3
vlc 3.0.19
vlc.install 3.0.19
vscode.install 1.83.1
wincompose.install 0.9.11
windows-performance-toolkit 8.1.0
WinPcap 4.1.3.20161116
wireshark 4.0.10
WSLGit 1.0.1
xournal 0.4.8
xournalplusplus 1.2.0
yed 3.23.2
yq 4.33.3
yt-dlp 2023.10.13
zotero 6.0.30
105 packages installed.
```

### Output Log

```bash
https://gist.github.com/1EDExg0ffyXfTEqdIUAYNZGnCeajIxMWd2vaQeP/56c6c55521c7b03029f6418202866933
```

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the two-step `choco upgrade vlc vlc.install` sequence described in the issue and review the linked output log. Trace the `choco upgrade` entry point to determine why an already-installed package is downloaded again. Done means the repeated command skips the installed package and reports the expected skip message without downloading or installing it again.

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.