我想在自定义的Linuxbrew公式中嵌入补丁,我一直按照公式菜谱网站的说明进行操作:https://github.com/Homebrew/homebrew/wiki/Formula-Cookbook
不幸的是,在交互模式下向本地公式添加嵌入式补丁后,我不知道如何继续安装。在命令提示符下,它表示要输入'exit'继续,但这并不像我预期的那样工作。
$ brew install --interactive –-git urg.rb
==> Downloading http://downloads.sourceforge.net/project/urgnetwork/urg_library/urg_library-1.1.2.zip
Already downloaded: /home/chris/.cache/Homebrew/urg-1.1.2.zip
Initialized empty Git repository in /tmp/urg-w58G/urg_library-1.1.2/.git/
==> Entering interactive mode
Type `exit' to return and finalize the installation
Install to this prefix: /home/chris/.linuxbrew/Cellar/urg/1.1.2
This directory is now a git repo. Make your changes and then use:
git diff | pbcopy
to copy the diff to the clipboard.
$ vi src/urg_serial_linux.c
→ Here I manually add the line: #include <sys/select.h>
$ git diff | xsel --clipboard --input
$ brew edit urg.rb
或者,我可以使用交互模式中的信息在homebrew github存储库中手动添加嵌入式补丁,但补丁失败。
==> Downloading http://downloads.sourceforge.net/project/urgnetwork/urg_library/urg_library-1.1.2.zip
Already downloaded: /home/chris/.cache/Homebrew/urg-1.1.2.zip
==> Patching
patching file src/urg_serial_linux.c
Hunk #1 FAILED at 8.
1 out of 1 hunk FAILED -- saving rejects to file src/urg_serial_linux.c.rej
你能告诉我Linuxbrew保存.rej文件的位置或者我如何继续交互模式吗?提前谢谢。
-Chris
答案 0 :(得分:0)
您可以运行brew install --debug --git urg.rb
。这种方式首次失败时,您将能够在构建目录中打开shell。应该可以从那里访问.rej文件。