gpt4 book ai didi

rpm - 让 rpm %patch 不使用默认的 --fuzz=0 选项

转载 作者:行者123 更新时间:2023-12-04 00:35:35 25 4
gpt4 key购买 nike

我在 el6 机器上得到如下错误:

Patch #4 (test.patch):
+ /bin/cat /path/to/test.patch
+ /usr/bin/patch -s -p0 --fuzz=0
1 out of 4 hunks FAILED -- saving rejects to file ***
1 out of 1 hunk FAILED -- saving rejects to file ***
error: Bad exit status from /var/tmp/rpm-tmp.YeRtKr (%prep)

但是,我可以按以下方式使用 commond 应用补丁文件:

/usr/bin/patch -s -p0 < /path/to/test.patch .

我注意到 rpm 集 --fuzz=0默认。有什么方法可以让 rpm 不设置 --fuzz=0选项?

最佳答案

来自Fedora project wiki :

Try to ensure that your patch match the context exactly. The default "fuzz" value is "0", requiring matches to be exact. You can work around this by adding %global _default_patch_fuzz 2 to revert to the value found in older versions of RPM in Fedora, but it is generally recommended to avoid doing this.

关于rpm - 让 rpm %patch 不使用默认的 --fuzz=0 选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24951960/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com