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

Incomplete/failed install proceeds as if successful in at least one case #838

Open
mkmurray opened this issue Jun 29, 2016 · 8 comments
Open

Comments

@mkmurray
Copy link

A simple way to reproduce Chocolatey thinking something installed correctly when it actually failed:

  • Have an out-of-date Git package installed (something pre-2.9)
  • Run the choco upgrade git command from the Git Bash window
  • It will fail but still think that Git 2.9 installed correctly

What is happening is that the installer for Git can't proceed because you have Git Bash open and it needs to close it to do the install. Obviously I've worked around this now and ran from PowerShell instead with a --force flag to reinstall.

But I would expect Chocolatey to not have thought it installed correctly. From the logs, it appears it knew there was a return result of 1 (non-zero).

Let me know if there is any other context I can provide. Thanks.

@ferventcoder
Copy link
Member

ferventcoder commented Jun 29, 2016

Please provide the logs for this command (as the instructions should have indicated when you created this issue in the template). The log files contain debug verbose output. Those are in c:\programdata\chocolatey\logs (default installation location).

This will contain versions of Chocolatey, Windows and PowerShell, so we won't need those. Plus it will allow seeing what may have happened here.

If you are not comfortable providing the logs here, you can send them to me directly at ferventcoder [at] gmail

@ferventcoder
Copy link
Member

ferventcoder commented Jun 29, 2016

High level curiosity while you are getting the logs, was version of choco was this?

@mkmurray
Copy link
Author

mkmurray commented Aug 5, 2016

Hi, sorry, forgot about this thread until I ran into it again today. I was using the latest chocolatey when I first ran into it almost a month ago, didn't check for a new version today.

Here's the log from today, where I again left the git bash open and it failed, but choco will say you're at the new version. So in the log you'll see me do a --force again like a month ago.

chocolatey.log

@ferventcoder
Copy link
Member

@mkmurray So dumb question here.

choco list -lo says what about git vs git.install? I think what you are seeing is the metadata package git successfully upgrades but git.install does not, which means that the actual install of git is still on the older version.

Chocolatey upgraded 1/2 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2016-08-05 16:39:46,517 [INFO ] -
2016-08-05 16:39:46,533 [ERROR] - Failures
2016-08-05 16:39:46,549 [ERROR] -  - git.install (exited 1) - Error while running 'C:\ProgramData\chocolatey\lib\git.install\tools\chocolateyInstall.ps1'.

@ferventcoder
Copy link
Member

Then when you force it, it reruns the git.install package and all is successful.

@mkmurray
Copy link
Author

mkmurray commented Aug 9, 2016

I think you are exactly right; I'm not still in a broken state, but my memory seems to confirm your assertion. Isn't that still a problem though to have the metadata package be updated but not the actual install?

@ferventcoder
Copy link
Member

@mkmurray I think it can cause exactly these kinds of confusion when the meta package is updated but the actual installer package is not. The hard part is determining when this is the case versus other kinds of dependencies.

@mkmurray
Copy link
Author

I agree, and can appreciate the complexity of solving this issue. Still thought I'd post the bug report as it's definitely confusing and unexpected behavior from a user standpoint.

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

2 participants