2

我想将补丁嵌入到自定义 Linuxbrew 公式中,并且我一直按照公式食谱网站的说明进行操作:https ://github.com/Homebrew/homebrew/wiki/Formula-Cookbook

不幸的是,我以交互模式在本地公式中添加了嵌入式补丁后,我不知道如何继续安装。在命令提示符下,它说输入“退出”以继续,但这并没有像我预期的那样工作。

$ 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 文件保存在哪里,或者我可以如何继续交互模式吗?先感谢您。

-克里斯

4

1 回答 1

0

你可能会跑brew install --debug --git urg.rb。这种方式在第一次失败时您将能够在构建目录中打开一个 shell。.rej 文件应该可以从那里访问。

于 2015-05-26T10:19:37.003 回答