0

我正在尝试修补 dwm 文件夹(patch -p1 -f < ../patches/dwm-alpha-6.1.diff)中的 config.def.h,但我有一些错误:(我尝试添加到 dwm alpha 补丁,它添加到 dwm 一些透明度但我有一些错误。我使用patch -p1 -f < ../patches/dwm-alpha-6.1.diff,因为我以这种方式成功修补了网格模式。但是使用 alpha 我有一些错误...哎呀:(

这个错误:

patching file config.def.h
Hunk #1 FAILED at 11.
1 out of 1 hunk FAILED -- saving rejects to file config.def.h.rej
patching file config.mk
Hunk #1 FAILED at 22.
1 out of 1 hunk FAILED -- saving rejects to file config.mk.rej
patching file drw.c
Hunk #1 FAILED at 61.
Hunk #2 FAILED at 71.
Hunk #3 FAILED at 86.
Hunk #4 FAILED at 180.
Hunk #5 FAILED at 245.
5 out of 5 hunks FAILED -- saving rejects to file drw.c.rej
patching file drw.h
Hunk #1 FAILED at 30.
Hunk #2 FAILED at 43.
Hunk #3 FAILED at 55.
3 out of 3 hunks FAILED -- saving rejects to file drw.h.rej
patching file dwm.c
Hunk #1 succeeded at 59 with fuzz 2 (offset 2 lines).
Hunk #2 FAILED at 234.
Hunk #3 succeeded at 278 with fuzz 2 (offset 9 lines).
Hunk #4 FAILED at 1563.
Hunk #5 FAILED at 1587.
Hunk #6 FAILED at 1805.
Hunk #7 succeeded at 2163 (offset 49 lines).
4 out of 7 hunks FAILED -- saving rejects to file dwm.c.rej

你能帮我吗?

4

1 回答 1

0

在 dwm 中打补丁并不完美,您不能保证任何给定的补丁都能正常工作,特别是如果您之前已经打过 dwm 补丁。如果补丁失败,您可以恢复到以前的状态(补丁之前)或在 *.rej 文件之后手动补丁。

要恢复到以前的状态,您会发现 *.orig 文件 exampledwm.c.origconfig.def.h.orig。只需将这些文件复制到相应的源,即cp dwm.c.orig dwm.c.

要手动修补,您将找到 *.rej 文件。打开这些文件并按照它们的附加和删除,例如,如果它是

-       x = 0;
+       x = 1;

只需删除第一行并添加第二行。希望我足够清楚,我不是专家,但我希望这会有所帮助。

于 2022-01-31T10:20:22.830 回答