首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在自定义Linuxbrew公式中嵌入补丁

在自定义Linuxbrew公式中嵌入补丁
EN

Stack Overflow用户
提问于 2014-05-28 05:23:21
回答 1查看 735关注 0票数 2

我想在一个定制的Linuxbrew公式中嵌入一个补丁,并且我一直在遵循公式食谱网站上的说明:https://github.com/Homebrew/homebrew/wiki/Formula-Cookbook

不幸的是,在交互模式下将嵌入补丁添加到本地公式后,我不知道如何继续安装。在命令提示符下,输入'exit‘以继续,但这并不像我预期的那样工作。

代码语言:javascript
复制
$ 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存储库中手动添加嵌入式补丁,但补丁失败。

代码语言:javascript
复制
==> 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

EN

回答 1

Stack Overflow用户

发布于 2015-05-26 18:19:37

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23899195

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档