Why i have an eror while patching dwm?

1.4k views Asked by At

I'm trying to patch config.def.h in dwm folder (patch -p1 -f < ../patches/dwm-alpha-6.1.diff), but i have some errors :( I tryed add to dwm alpha patch, which the add to dwm some transparency but i have some errors. I use patch -p1 -f < ../patches/dwm-alpha-6.1.diff, because i successfully patched gridmode in this way. But with alpha i have some errors... Oops:(

this errors:

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

Can u help me pls?

1

There are 1 answers

0
Cathal OGrady On

Patching in dwm is not perfect and you are not guarenteed any given patch will work especially if you have patched dwm before. If a patch fails like that you can either revert to your previous state( before patched ) or manually patch following the *.rej files.

To revert to previous state, you will find *.orig files example dwm.c.orig, config.def.h.orig, etc. Just copy these files to there respective source ie cp dwm.c.orig dwm.c.

To manually patch you will find *.rej files. Open these files and follow their appends and removals e.g if it sais

-       x = 0;
+       x = 1;

simply remove the first line and add the second. Hope I was clear enough, I'm not an expert but I hope this helps.