[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I find out which patches were applied?

Thorin Oakenshield wrote:
but how can I find out if this one was the last I applied and I'm still
missing the 022_kerberos_patch file?

The "-C" option of patch is very useful for this. It will "attempt" to apply the patch, but not actually change anything.

I have got into the habit of running patch three times:
1) first time, with a -C to make sure the patch applies cleanly.
2) Second time, for real
3) Third time, to make sure I really did NOT forget to remove the -C on the second run...

That third run will produce an error message about it being a "reversed patch", and offer to back out the changes. If I get that, it means I actually got it in the tree.

Apparently, step one is from getting a few bad patches or conflicting patches (lesson: don't ask five people for comments on an article. You get either no comments or five conflicting and overlapping patches 8)
Step 3 is because...uh... I'm a royal screwup sometimes. I've learned a certain amount of fault-tollerance. 8)

Anyway, if you try to re-apply a patch (even better, if you attempt to do it with a -C), it will let you know...so trying to do so is a decent test.