Definition of hunk Slang. a handsome man with a well-developed physique. a large or fat person.
If you call someone a hunk, you think he's hot.
How to use Hunk in a sentence. You are one hunk of gorgeous. A messenger sought him out the moment he sat with a hunk of bread and ale, ordering him back to the hold with no explanation. She ignored the hunk, hoping he'd take the hint.
It is an error generated by patch
. If you would open the .patch
file, you'd see that it's organized in a bunch of segments, so-called "hunks". Every hunk identifies corresponding pieces of code (by line numbers) in the old and new version, the differences between those pieces of code, and similarities between them (the "context").
A hunk might fail if the similarities of a hunk don't match what's in the original file. When you see this error, it is almost always because you're using a patch for the wrong version of the code you're patching. There are a few ways to work around this:
libdvdnav
that already includes the patch (best option)..patch
file for the version of libdvdnav
you're patching.libdvdnav
, and correct them according to the instructions in the patch.libdvdnav
that's closer to whatever version the .patch
file was intended for (probably a bad idea).In some cases, there is no difference in file versions, but only in indentation, spacing, line ending or line numbers.
To patch despite those differences, it's possible to use the following two arguments :
--ignore-whitespace : It ignores whitespace differences (indentation, etc).
--fuzz 3 : the "--fuzz X" option sets the maximum fuzz factor to lines. This option only applies to context and unified diffs; it ignores up to X lines while looking for the place to install a hunk. Note that a larger fuzz factor increases the odds of making a faulty patch. The default fuzz factor is 2; there is no point to setting it to more than the number of lines of context in the diff, ordinarily 3.
Don't forget to user "--dry-run" : It'll try the patch without applying it.
Example :
patch --verbose --dry-run --ignore-whitespace --fuzz 3 < /path/to/patch.patch
More informations about Fuzz :
https://www.gnu.org/software/diffutils/manual/html_node/Inexact.html
Debugging Tips
markus@ubuntu:~$ patch -Np1 --ignore-whitespace -d software-1.0 < fix-bug.patch
see tutorial by markus
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With