This repository has been archived by the owner. It is now read-only.

Inconsistent Library/Formula/.gitignore file !? #18115

Closed
tub78 opened this Issue Feb 27, 2013 · 4 comments

Comments

Projects
None yet
3 participants

tub78 commented Feb 27, 2013

According to mxcl#13284 (comment),
all of the formulas listed in Library/Formula/.gitignore should correspond to symbolic links pointing to alternatively-tapped formulas.

If this is correct, then the following command should have no output:

cd $(brew --repository) && for ii in $(cat Library/Formula/.gitignore); do [ -L Library/Formula/$ii ] || echo "Not a link: $ii"; done

Unfortunately, I am seeing: bison.rb, tophat.rb, and vim.rb in the output of this command.

How can I fix this?

... more detail ...

Since I have only tapped homebrew-science and homebrew-dupes, which do not contain bison.rb or vim.rb, I do not understand why these formula have been included in .gitignore.

In the other instance (tophat.rb), the file Library/Formula/tophat.rb should be be a symlink to ../Taps/homebrew-science/tophat.rb. I suspect that I overwrote the symlink while un-stashing earlier changes to this formula, thereby creating this inconsistent state (c.f. mxcl#15837)

Here's the output of brew --config and brew doctor:

https://gist.github.com/tub78/5048884

Contributor

jacknagel commented Feb 27, 2013

I'm fairly certain this happens because both bison and vim used to be in dupes, but were moved to core. I've noticed similar things before, but it never caused any noticeable problems for me so I didn't care enough to try and fix it.

tub78 commented Feb 28, 2013

Thanks for the confirmation. Now that I understand what is happening, it makes sense. I was really confused for a while.

The brew tap --repair command does not appear to remove items from .gitignore, however, one can mv Library/Formula/.gitignore Library/Formula/_gitignore && brew tap --repair to recreate the default settings.

Contributor

jacknagel commented Feb 28, 2013

The code responsible for removing things from the gitignore file is in Library/Homebrew/cmd/untap.rb, in the unlink_tap_formula method. This gets called by brew update.

So that will need to be updated to handle the "removed from one tap, added to core" case better.

Contributor

adamv commented Aug 17, 2013

Closing as a duplicate of #19799.

@adamv adamv closed this Aug 17, 2013

@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.