Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to add the transparency patch to dwm. I downloaded the .diff file and in my dwm directory ran this:

max@linux-vwzy:~/misc/dwm/dwm-5.9> patch < dwm-transparency.diff 
patching file config.def.h
patching file dwm.c
Hunk #1 FAILED at 58.
Hunk #5 succeeded at 306 (offset 1 line).
Hunk #6 succeeded at 847 (offset 27 lines).
Hunk #7 succeeded at 882 (offset 27 lines).
Hunk #8 FAILED at 1125.
Hunk #9 succeeded at 1558 with fuzz 1 (offset 2 lines).
2 out of 9 hunks FAILED -- saving rejects to file dwm.c.rej

I've patched dwm before to add a couple other patches. Is it possible that they are conflicting? Or is this another error?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

The patch is failing because the other patches that you have previously applied have shifted the code around sufficiently to defeat patch's attempts to apply the change, even with an offset (as can be seen in those hunks that did succeed).

If you open dwm.c.rej you will see the failed hunks, then it is just a matter of hand patching them in to dwm.c.

For each failed hunk, search in dwm.c for the original code (the lines that begin with a - in dwm.c.rej) and replace them with the patched code (those lines beginning with a +). If dwm recompiles without error, you have successfully patched in transparency.

share|improve this answer
    
Thanks jason, I'll give this a try in a couple minutes when I get my font right –  MaxMackie Dec 12 '11 at 5:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.