brew update problem #11425

Closed
bbiker opened this Issue Apr 3, 2012 · 12 comments

6 participants

@bbiker

refer to git://gist.github.com/2294435.git

I have no "/Library/Formula" or "~/Library/Formula" directory and no "cocot.rb" file any where.

Lion 10.7.3

brew doctor states that brew needs to be updated.

Hope you can resolve this problem.

renard@nc.rr.com

@mistydemeo

The Library/Formula directory is in your brew prefix (probably /usr/local). cocot.rb was removed and then readded, and it appears that your local copy was not removed when it was deleted from Homebrew. If you delete the file, you should be able to update.

Let me know if you have any more problems!

@mistydemeo mistydemeo closed this Apr 3, 2012
@bbiker

The instructions was not clear ... i expected the Library/Formula directory to be located either in the root directory or in my home directory ... the cocot.rb was actually located in /usr/local/Library/Formula directory.

Prior your response, I uninstalled brew per instruction in the wiki and the reinstalled it.

I had to rm the ".git" directory in order to install brew.

cocot.rb file is still present in the latest version of brew.

@mistydemeo

cocot.rb should be present in an up to date version because it was readded to Homebrew. As long as brew update is working, you're fine.

@bbiker

I do not mean to be a PITA ...
After re-installing brew, I deleted cocot.rb and then ran brew update. It ran without a problem ... obviously I was up to date.

I had uninstalled brew version 0.9 .. same as the new one. When I ran brew update the result stated that I needed to delete cocot.rb. This started this thread.

@jacknagel

We understand. However, there is nothing to fix here.

brew update is built on top of git; this error:

error: The following untracked working tree files would be overwritten by merge:
    Library/Formula/cocot.rb
Please move or remove them before you can merge.

is a git error. Something caused this on-disk file to be out of sync with the repository.

As @mistydemeo said, if it's working now then there is nothing more to worry about.

@renatomoya

Thanks, this solved the problem.

@tyre

This solved my problem (with ninja.rb instead of cocot.rb) but I agree that the Library/Formula/ output is misleading. I tried / and ~/ before resorting to Google. Would be nice if it specified brew prefix.

@mxcl
Homebrew member

It amazes me that people wouldn't check the brew prefix. It's like asking where the restroom is and the waitress says: "up stairs", and so you first go home and go upstairs, but it's not there, so then you go to the capital city in your country and can't find it, and then you go back to the restaurant and say: "WELL WHY DIDN'T YOU SAY IN THIS RESTAURANT? FFS EVERYONE ELSE BUT ME IS SO STUPID."

@mxcl
Homebrew member

In fact I can't even improve this output since it is git's output and not under our control.

@tyre

@mxcl I love what you've made and will continue to use it, but please stop acting like a complete jackass. The second comment was all that was needed.

Scripts bounce around directories all the time, so unqualified directory structures are actually very unhelpful. Given that there are other similar issues raised (e.g. http://github.com/mxcl/homebrew/issues/11448), this clearly goes against common standards.

@mxcl
Homebrew member

Possibly this will fix it:

git --git-dir=/usr/local/.git fetch origin

Patch welcome. Possibly it will break something though, generally I would consider this not worth the risk for a 0.0001% edge case bug that affects two people who can't find directories under their noses.

@mxcl
Homebrew member

Note, the directory needs to be changed to '/' first I expect. Definitely would push this if a patch is provided that has been thoroughly tested.

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.