【问题标题】:Why i have an eror while patching dwm?为什么我在修补 dwm 时出错?
【发布时间】:2021-10-31 09:06:59
【问题描述】:

我正在尝试修补 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,因为我以这种方式成功修补了gridmode。但是使用 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

你能帮帮我吗?

【问题讨论】:

    标签: patch x-dwm


    【解决方案1】:

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

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

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

    -       x = 0;
    +       x = 1;
    

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-31
      • 2020-02-09
      • 2010-10-12
      • 1970-01-01
      • 2022-11-20
      相关资源
      最近更新 更多