Skip to content
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

Failed update removes package of local library #2020

Closed
jlssmt opened this issue Mar 29, 2020 · 5 comments
Closed

Failed update removes package of local library #2020

jlssmt opened this issue Mar 29, 2020 · 5 comments

Comments

@jlssmt
Copy link

jlssmt commented Mar 29, 2020

What You Are Seeing?

if an update fails, the whole package get removed of the local installed library and will never be updated again (with "choco upgrade all")

What is Expected?

package stays in local library and will be updated the next time "choco upgrade all" gets called.

How Did You Get This To Happen? (Steps to Reproduce)

enter "choco upgrade all". press ctrl+c while downloading a new update for a package. enter "choco list --localonly". failed package won't be in list.

@OnBeyondBeing
Copy link

I've had the same problem and I consider this a show-stopper for chocolatey deployment. Running "choco upgrade all" every day/week/month will eventually remove dozens of packages.

Did you ever find a solution to this?

@TheCakeIsNaOH
Copy link
Member

TheCakeIsNaOH commented Oct 20, 2021

This appears to be a duplicate of #1548

The solution/workarround is to not press ctrl+c when updating. If you commonly have reasons to stop a package upgrade with ctrl+c, then lets work on seeing if those things can be fixed.

@OnBeyondBeing
Copy link

@TheCakeIsNaOH Thanks, for that reference. This does indeed seem to be the same problem.

However the title of issue #1548 is misleading. As @bcurran3 says, any failure during an upgrade will cause that package to be removed. This is not just a problem of people pressing CTRL+C at bad times. The upgrade can fail and cause the package to be removed for a whole host of reasons:

  • Network failure
  • Bug in the install scripts
  • Hash check failure
  • Permission error
  • A user not responding to a prompt fast enough
  • Read/Write disk error
  • And, of course, a user pressing CTRL+C

I'm honestly shocked that such a destructive bug has been left open for over 3 years on such an important project. It basically makes background updates too dangerous to do, which severely limits chocolatey's usefulness in a business setting, at least.

@ferventcoder Do you know about this bug? It seems like it would be a problem for most of the use-cases described here.

@jlssmt
Copy link
Author

jlssmt commented Oct 21, 2021

@OnBeyondBeing
Nope. Never found a solution.
And yes, your description is completely right. This problems will occur over the time and you can't do anything.
I'm currently testing winget. It's not free of bugs also but it detects every application on the system automatically, no matter if it's installed by winget or not and checks for update. This is exactly what I've always missing in chocolatey for years.

@pauby
Copy link
Member

pauby commented Aug 28, 2024

Duplicate of #619

@pauby pauby marked this as a duplicate of #619 Aug 28, 2024
@pauby pauby closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants