It would be nice to switch --dry-run to -o /dev/null in epatch, so that when a patch fails and patch.out reports "saving rejects to foo.rej" this file would actually exist, and could be used to troubleshoot the failed patch. As far as I know, this would not cause any undesirable side-effects. I know this has been discussed briefly in another bug report *somewhere* but I cannot find it today. To make matters even MORE confusing, even if a user KNOWS that --dry-run does not actually produce a rejects file, epatch lies and does not tell the user that it is using --dry-run: echo "PATCH COMMAND: ${patch_cmd} < '${PATCH_TARGET}'" ... ${patch_cmd} --dry-run -f < "${PATCH_TARGET}" 2>&1 Reproducible: Always
i'm not sure relying on this trick is safe or really even useful. the log also provides the full name of the patch, so it's fairly trivial to apply it yourself if you want to see where things are going wrong.
While poking around recent gnu patch changes, I noticed that dry-run behavior has been changed. It uses better language so it's very clear that it's a dry run, and no longer claims to be creating a rejects file on dry run. Unless anyone objects, I will close this bug when we get a patch release with these changes: http://git.savannah.gnu.org/gitweb/?p=patch.git;a=commitdiff;h=3ccb16e10b7b4312e9b6096760ddc4c2d90194f2
sys-devel/patch-2.7.1 includes this patch, closing
thanks for following up