-
Notifications
You must be signed in to change notification settings - Fork 909
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
Unable to upgrade a package if a dependency only contains pre-release package versions, or if package no longer exists on available sources #3292
Comments
These changes makes sure that we pass along any pre-release flag when there is a pre-release package that is a parent of one of the packages that we are installing, and to verify that the results is not null before we attempt to use it. This ensures that pre-release only packages can be found when we look up the parent, and if by some reason the package can not be found we do not throw an undesired null exception in this case.
These changes makes sure that we pass along any pre-release flag when there is a pre-release package that is a parent of one of the packages that we are installing, and to verify that the results is not null before we attempt to use it. This ensures that pre-release only packages can be found when we look up the parent, and if by some reason the package can not be found we do not throw an undesired null exception in this case.
These changes makes sure that we pass along any pre-release flag when there is a pre-release package that is a parent of one of the packages that we are installing, and to verify that the results is not null before we attempt to use it. This ensures that pre-release only packages can be found when we look up the parent, and if by some reason the package can not be found we do not throw an undesired null exception in this case.
…ade-package-if-p (#3292) Ensure pre-release flag is used for parent lookup
* hotfix/2.2.2: (maint) Remove unnecessary line break (#3292) Ensure pre-release flag is used for parent lookup
* master: (maint) Remove unnecessary line break (#3292) Ensure pre-release flag is used for parent lookup
🎉 This issue has been resolved in version 2.2.2 🎉 The release is available on: Your GitReleaseManager bot 📦🚀 |
Do note that this bug also affects installed packages that does not exist on your sources, but the dependency of the package exist and you are attempting to upgrade it. As an example.
To work around this issue for the above either ensure that all packages exist on one or more sources configured, or uninstall package y before attempting to upgrade package x. This can affect upgrading Chocolatey CLI itself as well, as there are quite a few existing packages that have a dependency on EDIT: This was also fixed as part of fixing this issue. |
If you run into this issue upgrading Chocolatey CLI itself, the easiest way I found to determine the problematic package is to use There may be a better way to do this, but long term, a command to see the dependency graph would be very useful: #1125 |
Checklist
What You Are Seeing?
When I have installed an older version of a package, and there is a package installed that have a dependency on this package but only has pre-releases available, if I then later try to upgrade the dependent package it will throw a null reference exception preventing the upgrading.
What is Expected?
An upgrade of a package should succeed, even if a parent package is missing or only contain pre-releases on the configured sources.
How Did You Get This To Happen?
chocolatey-core.extension
version 1.3.3.firefox-dev
chocolatey-core.extension
to latest version.System Details
Installed Packages
Output Log
Additional Context
No response
The text was updated successfully, but these errors were encountered: