-
Notifications
You must be signed in to change notification settings - Fork 907
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
choco upgrade all upgrades package even if one package requires a specific version #3598
Comments
There is not enough information to investigate this issue. Please go back to the description and complete 'What you are seeing' and 'What is expected' sections more fully. |
What do you possibly need? I am not sure which information is relevant at this point. |
The output log is very truncated, it is not the full log file of the entire verbose+debug output of the command. The "What you are seeing" and "What is expected" are very vague. What package is affected? What is the other package that has the version contraint? What versions are affected? What is the error message you are talking about? It looks like you may have a broken dependency, see this page for how to solve it yourself: |
I dont think giving the packages names would change anything since it is a custom package (axivion). Do I need to upload the complete package with full info? Axivion requires 17.x of openjdk. upgrade all however upgrades openjdk to 22. Axivion requires a specific Python version as well and upgrade all does not upgrade Python, which is my expected behavior. The question is why it does not do the same for openjdk. |
That's why we ask for the logs. From the output and what you've said, it seems that chocolatey is seeing updates to both of those packages, then when it attempts to upgrade them and it ensures they won't break dependencies if stops and doesn't upgrade them. But without logs it's hard to tell. |
Choco is seeing the possible upgrade but is supposed to not upgrade since axivion requires openjdk 17 instead of 22. |
Yes. That's the process Chocolatey takes when it is asked to upgrade:
As a reproduction, I created a package with the following nuspec and installed it on a fresh VM: <?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>demo</id>
<version>1.0.0</version>
<authors>none</authors>
<description>Demo package</description>
<title>demo (Install)</title>
<dependencies>
<dependency id="openjdk" version="[17.0.2]" />
<dependency id="python" version="[3.12.8]" />
</dependencies>
</metadata>
</package> I then ran |
I have adjujsted your nuspec with my settings. Minimum openjdk version is 17, accepting until 18 which is excluded. With this nuspec, executing choco upgrade all, it upgrades openjdk to 22, which is forbidden.
log: C:\code\axivionPackage\demo>choco upgrade openjdk You have openjdk v17.0.2 installed. Version 22.0.2 is available based on your source(s). openjdk v22.0.2 [Approved] |
Checklist
What You Are Seeing?
It upgrades a package.
What is Expected?
It keeps the package version as it is required by another package.
How Did You Get This To Happen?
choco upgrade all
System Details
Installed Packages
Output Log
Additional Context
No response
The text was updated successfully, but these errors were encountered: