Rockbox Development > Starting Development and Compiling

Is there a tutorial for fixing "hunk failures" when attempting to apply a patch?

(1/1)

lee321987:
   The subject is my question.

  If not would someone at least tell me this...
  Does this message:

--- Code: ---Hunk #1 FAILED at 99.
--- End code ---
refer line 99 of the file I'm trying to patch, or the .patch file itself.

   Thank you.

cool_walking_:
It's referring to the file it's trying to patch.

mschneider:
Hunk failures are just places where the patch and the file don't match up. Just go to the .rej file (automatically created) and paste in the code at the line numbers it says. Just manually apply it. 

PaulPosition:
Uh...

Before you go in and f*ck everything up, I suggest you have a look at the .rej file itself. The parts with minus signs ( - ) are lines that should be replaced or removed, and the parts with plus signs ( + ) are lines that should be added.

When hunk fails it's either because the ' - ' lines couldn't be found NEAR the place they were expected to be (ie, a previous patch or revision added so much code that they are now hundreds of lines lower down the file) OR because those replaced lines couldn't be found AT ALL (ie, they've already been replaced or removed entirely).  In the later case, it's much, much, much more difficult - perhaps impossible - to apply your patch.

lee321987:
   Thanks for the help guys.
   And <PaulPosition> -- excellent explanation.

Navigation

[0] Message Index

Go to full version