Summary: | eutils.eclass: epatch: failed to apply patch when using --dry-run and multiple hunks against the same file | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Perfect Gentleman <perfect007gentleman> |
Component: | [OLD] Library | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Perfect Gentleman
2015-11-10 07:53:40 UTC
I think this might be a bug in sys-apps/patch. 'patch -p1 --dry-run' fails while 'patch -p1' succeeds (on freetype-2.6.1). The problem seems to be that the patch patches "ChangeLog" multiple times and these patches on depend on each other. Without --dry-run patch applies the patches one after each other and everything works. With --dry-run patch sees whether the first patch applies. Next, it checks whether the second patch applies _to the original file_, to which the second patch might not apply after all. Another thing to note is that patch is also not able to reverse (option -R) these kind of patches. Either such patches are invalid or these are bugs in patch. did you read patch.out? there is "patch -p1 -g0 -E --no-backup-if-mismatch < '/home/my_user/overlay/media-libs/freetype/files/02-upstream-2015.11.08.patch'" which didn't work for epatch, but it works itself. epatch first uses internally in addition the "--dry-run" and "-f" options but does not tell you about that in patch.out. i've clarified the log here: http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bb3a73979d7023e7425b9a0acc1324070044278 but in the end, epatch requires patches pass --dry-run mode, and your patch does not do that (because it modifies the same file multiple times). |