Applying patch breaks brew
jwhite007 opened this issue · 3 comments
Please note that we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
- ran a
brew
command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Linuxbrew/homebrew-core: https://github.com/Linuxbrew/homebrew-core/issues/new/choose. If it's abrew cask
problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap. - ran
brew update
and can still reproduce the problem?
Actually happened during brew update - ran
brew doctor
, fixed all issues and can still reproduce the problem? - ran
brew config
andbrew doctor
and included their output with your issue?
What you were trying to do (and why)
brew dr
told me to git -C "/home/linuxbrew/.linuxbrew/Homebrew" remote set-url origin https://github.com/Homebrew/brew
After doing so, I proceeded to install blat.
What happened (include command output)
Brew broke while trying to update.
Command output
$ brew install blat
Updating Homebrew...
.git/rebase-apply/patch:38750: trailing whitespace.
Libs: -L${libdir} -lcurl
.git/rebase-apply/patch:38769: trailing whitespace.
Libs: -L${libdir} -lexslt -lxslt -lxml2 -lz -lpthread -licucore -lm
.git/rebase-apply/patch:38788: trailing whitespace.
Libs.private: -lpthread -lz -lm
.git/rebase-apply/patch:38789: trailing whitespace.
Cflags: -I${includedir}/libxml2
.git/rebase-apply/patch:38806: trailing whitespace.
Libs: -L${libdir} -lxslt -lxml2 -lz -lpthread -licucore -lm
warning: squelched 35 whitespace errors
warning: 40 lines add whitespace errors.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
/home/linuxbrew/.linuxbrew/bin/brew: line 1: syntax error near unexpected token<<<' /home/linuxbrew/.linuxbrew/bin/brew: line 1:
<<<<<<< HEAD'
/home/linuxbrew/.linuxbrew/bin/brew: line 1: syntax error near unexpected token<<<' /home/linuxbrew/.linuxbrew/bin/brew: line 1:
<<<<<<< HEAD'
What you expected to happen
Installation of blat and if update of brew needed, then a functional brew.
Step-by-step reproduction instructions (by running brew
commands)
Basically what I've laid out above.
It looks like you may have had some uncommitted changes to brew. To discard those changes run
brew update-reset
Warning: This command will discard any unsaved changes you have to all taps.
Thanks, @sjackman; however this wouldn't have worked if I hadn't had a backup of the dir Homebrew. I had to restore that dir, because the command brew was completely broken. I then issued git -C "/home/linuxbrew/.linuxbrew/Homebrew" remote set-url origin https://github.com/Homebrew/brew
from the repo dir and then brew update-reset
which resulted in me being prompted for my github credentials during ==> Fetching /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-boneyard...
which I didn't think was right, so I issued brew untap homebrew/homebrew-boneyard
and then again brew update-reset
, and now everything is working fine.
Cheers
Thanks for the heads up, James. Glad to hear that you got it working in the end.