I was applying a patch with quilt in Debian packaging that an error occurred:

Applying patch debian/patches/fixshare.patch
patching file net/slirp.c
Hunk #1 FAILED at 529.
1 out of 1 hunk FAILED -- rejects in file net/slirp.c

I googled it and I've understood that this error is because of "Fuzz" in applying patches. Now, my question is what's fuzz and how can I solve my problem in applying quilt patches?

I've read this article and did the steps that it told, but still I have problem!

  • 3
    @DisplayName - it's not that, it's the "fuzz factor" (man patch). @Mehrmaz - are you sure it's because of "fuzz" ? What was the next line after 1 out of 1 hunk FAILED ? – don_crissti Nov 29 '14 at 16:30
  • @don_crissti : Applying patch debian/patches/fix-share.patch patching file net/slirp.c Hunk #1 FAILED at 529. 1 out of 1 hunk FAILED -- rejects in file net/slirp.c Patch debian/patches/fix-share.patch can be reverse-applied – Fatemeh Abdollahei Dec 1 '14 at 4:25
  • 1
    @Mehrnaz - patch can be reverse-applied means the patch is already included or same changes were made to the source code. You should get rid of it (e.g. quilt delete -r fix-share.patch). Read here for more details. – don_crissti Dec 1 '14 at 13:10
  • @don_crissti thanks! but here quilt delete is not a good solution, because by using that, removed patch went back again! – Fatemeh Abdollahei Dec 3 '14 at 4:53

This is not necessarily due to fuzz (in particular if you have refreshed the patches as told in the article). It may happen that the source has changed in such a way that patches are completely out of date. For instance, the original source was:


and a patch told: replace line bb by dd (with some context, ignored here). Then the source changed to:


The patch still says: replace line bb by dd, but line bb no longer exists, so that the patch can no longer be applied successfully.

The solution is to look at the failed hunk, at the corresponding part of the old source (on which the patch could be applied), and try to see what has changed in the new source, then try to adapt the new source to regenerate the patch. This can only be done manually, and when there have been major changes in the source, this can be difficult, if not impossible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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