【问题标题】:Embedding a patch to a custom Linuxbrew formula将补丁嵌入自定义 Linuxbrew 公式
【发布时间】:2014-05-27 21:23:21
【问题描述】:

我想在自定义 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

或者,我可以使用交互模式中的信息在自制 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 文件保存在哪里或如何继续交互模式?提前谢谢你。

-克里斯

【问题讨论】:

    标签: git formula homebrew patch linuxbrew


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-06-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-06
      • 2023-03-27
      • 1970-01-01
      相关资源
      最近更新 更多