Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
If you get Reversed (or previously applied) patch detected! n then patch detected that the change contained in the patch seems to have already been made. If you actually did apply this patch previously and you just re-applied it in error, then just say no and abort this patch.
Sign upHave a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
commented Feb 8, 2019
Issue descriptionon https://github.com/NixOS/nixpkgs-channels/tree/nixos-18.09-small (@ 8c492fe)does the linux kernel 4.19 not build with the following log: The Problem:The patch kernelPatches.raspberry_pi_wifi_fix is still aplied:https://github.com/NixOS/nixpkgs-channels/blob/8c492fee0054a8613ce91ebf832ceec66288597d/pkgs/top-level/all-packages.nix#L14121-L14130 although the kernel is at version 4.19.20, which already contains the patch: https://github.com/NixOS/nixpkgs-channels/blob/8c492fee0054a8613ce91ebf832ceec66288597d/pkgs/os-specific/linux/kernel/linux-4.19.nix#L6 Steps to reproduceJust call nixos-rebuild with the state above.This can be fixed by applying 09af2fb Technical details |
changed the titlekernel-4.19 on current nixpkgs-channels/nixos-18.09-small does not build due to already applied patchFeb 8, 2019
commented Feb 8, 2019
Fixed by b01a89d already, but the channel may take a while to update. |
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
Next: Inexact, Previous: Changed White Space, Up: Imperfect [Contents][Index]
10.3.2 Applying Reversed Patches
Sometimes people run
diff
with the new file first instead ofsecond. This creates a diff that is “reversed”. To apply suchpatches, give patch
the --reverse (-R) option.patch
then attempts to swap each hunk around before applying it.Rejects come out in the swapped format.Often
patch
can guess that the patch is reversed. If the firsthunk of a patch fails, patch
reverses the hunk to see if it canapply it that way. If it can, patch
asks you if you want to havethe -R option set; if it can’t, patch
continues to applythe patch normally. This method cannot detect a reversed patch if it isa normal diff and the first command is an append (which should have beena delete) since appends always succeed, because a null context matchesanywhere. But most patches add or change lines rather than delete them,so most reversed normal diffs begin with a delete, which fails, andpatch
notices.If you apply a patch that you have already applied,
patch
thinksit is a reversed patch and offers to un-apply the patch. This could beconstrued as a feature. If you did this inadvertently and you don’twant to un-apply the patch, just answer ‘n’ to this offer and tothe subsequent “apply anyway” question—or type C-c to kill thepatch
process.