chocolatey / chocolatey/choco

upgrade - prerelease with dependencies that are also prerelease fails to upgrade

Open
#1,957 10 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

### What You Are Seeing?
I cannot upgrade a prerelease package which has a prerelease dependency w/o specifying `-pre` to `choco upgrade`

### What is Expected?
chocolatey attempts to upgrade the package because it sees it's out of date - without `-pre` - so it should likewise update any prerelease dependencies

seealso [my comment on #686](https://github.com/chocolatey/choco/issues/686#issuecomment-555166541)

### How Did You Get This To Happen? (Steps to Reproduce)
attempt `choco upgrade vivaldi` when an old prerelease package is installed

### Output Log

Full Log Output

~~~sh
C:\Users\Brandon> cup vivaldi -y
Chocolatey v0.10.15 Professional
Upgrading the following packages:
vivaldi
By upgrading you accept licenses for the packages.

vivaldi not upgraded. An error occurred during installation:
Unable to resolve dependency 'vivaldi.portable (= 2.9.1732.13-snapshot)'.
vivaldi package files upgrade completed. Performing other installation steps.
The upgrade of vivaldi was NOT successful.
vivaldi not upgraded. An error occurred during installation:
Unable to resolve dependency 'vivaldi.portable (= 2.9.1732.13-snapshot)'.

Chocolatey upgraded 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
- vivaldi (exited 1) - vivaldi not upgraded. An error occurred during installation:
Unable to resolve dependency 'vivaldi.portable (= 2.9.1732.13-snapshot)'.
C:\Users\Brandon> cup vivaldi -y -pre
Chocolatey v0.10.15 Professional
Upgrading the following packages:
vivaldi
By upgrading you accept licenses for the packages.

You have vivaldi v2.9.1719.3-snapshot installed. Version 2.9.1732.13-snapshot is available based on your source(s). Progress: Downloading vivaldi.portable 2.9.1732.13-snapshot... 100%
Progress: Downloading Vivaldi 2.9.1732.13-snapshot... 100%

vivaldi.portable v2.9.1732.13-snapshot
vivaldi.portable package files upgrade completed. Performing other installation steps.
Downloading vivaldi 64 bit
from 'https://downloads.vivaldi.com/snapshot-auto/Vivaldi.2.9.1732.13.x64.exe'
Using download CDN cache instead of original url.
~~~

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with `choco upgrade vivaldi` using an installed prerelease package and a prerelease dependency, then compare it with `choco upgrade vivaldi -y -pre`. Trace the upgrade dependency-resolution path and use the issue's expected behavior as the completion criterion: the first command should update the prerelease dependency without requiring `-pre`.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli, tooling
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.