Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 15613 - epatch has funny output and false failure
Summary: epatch has funny output and false failure
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-13 03:37 UTC by Seemant Kulleen (RETIRED)
Modified: 2003-02-18 03:21 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
epatch log file (djbdns-1.05-ipv6-gentoo.diff-8305.out.bz2,2.36 KB, application/octet-stream)
2003-02-13 03:38 UTC, Seemant Kulleen (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Seemant Kulleen (RETIRED) gentoo-dev 2003-02-13 03:37:24 UTC
hi Az,

patch -p1 < ${WORKDIR}/djbdns-1.05-gentoo.diff || die gives you:
patching file FILES
patching file Makefile
Hunk #5 succeeded at 329 (offset 4 lines).
Hunk #7 succeeded at 419 (offset 4 lines).
Hunk #9 succeeded at 534 (offset 4 lines).
Hunk #11 succeeded at 688 (offset 4 lines).
Hunk #13 succeeded at 766 (offset 4 lines).
Hunk #15 succeeded at 840 (offset 4 lines).
Hunk #17 succeeded at 890 (offset 4 lines).
Hunk #19 succeeded at 1086 (offset 4 lines).
Hunk #21 succeeded at 1175 (offset 4 lines).
Hunk #23 succeeded at 1217 (offset 4 lines).
patching file TARGETS
patching file axfr-get.c
patching file dns.h
Hunk #2 succeeded at 44 with fuzz 1.
Hunk #3 succeeded at 71 (offset 1 line).
patching file dns_ip6.c
patching file dns_ipq6.c
patching file dns_name.c
patching file dns_nd6.c
patching file dns_rcip.c
patching file dns_resolve.c
patching file dns_sortip6.c
patching file dns_transmit.c
patching file dnscache.c
patching file dnscache.c~
patching file dnsfilter.c
patching file dnsip6.c
patching file dnsip6q.c
patching file dnsname.c
patching file dnsq.c
patching file fmt_xlong.c
patching file haveip6.h1
patching file haveip6.h2
patching file haven2i.h1
patching file haven2i.h2
patching file hier.c
patching file ip6.h
patching file ip6_fmt.c
patching file ip6_scan.c
patching file log.c
patching file okclient.c
patching file printrecord.c
patching file qlog.c
patching file query.c
patching file query.h
patching file roots.c
patching file scan_xlong.c
patching file server.c
patching file sockaddr_in6.h1
patching file sockaddr_in6.h2
patching file socket.h
patching file socket_accept6.c
patching file socket_bind.c
patching file socket_bind6.c
patching file socket_connect6.c
patching file socket_getifidx.c
patching file socket_noipv6.c
patching file socket_recv6.c
patching file socket_send6.c
patching file socket_tcp6.c
patching file socket_udp6.c
patching file tdlookup.c
patching file tinydns-conf.c
patching file tinydns-data.c
patching file tinydns-edit.c
patching file tryip6.c
patching file tryn2i.c
patching file trysa6.c
patching file Makefile
Hunk #1 succeeded at 336 (offset 4 lines).
Hunk #3 succeeded at 875 (offset 4 lines).
Hunk #5 succeeded at 895 (offset 4 lines).
Hunk #7 succeeded at 911 (offset 4 lines).
>>> Source unpacked.


where as:
epatch ${WORKDIR}/djbdns-1.05-gentoo.diff

gives you:

 * Applying djbdns-1.05-ipv6-gentoo.diff...
/usr/sbin/ebuild.sh: line 1111:  8440 Aborted                 patch ${popts}
--dry-run -f -p${count} <${PATCH_TARGET}
>>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/} 2>&1
/usr/sbin/ebuild.sh: line 1111:  8451 Aborted                 patch ${popts}
--dry-run -f -p${count} <${PATCH_TARGET}
>>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/} 2>&1
/usr/sbin/ebuild.sh: line 1111:  8462 Aborted                 patch ${popts}
--dry-run -f -p${count} <${PATCH_TARGET}
>>${STDERR_TARGET%/*}/${x##*/}-${STDERR_TARGET##*/} 2>&1

 * Failed Patch: djbdns-1.05-ipv6-gentoo.diff!
 *
 * Include in your bugreport the contents of:
 *
 *   /var/tmp/portage/djbdns-1.05-r6/temp/djbdns-1.05-ipv6-gentoo.diff-8305.out


!!! ERROR: net-dns/djbdns-1.05-r6 failed.
!!! Function epatch, Line 302, Exitcode 0
!!! Failed Patch: djbdns-1.05-ipv6-gentoo.diff!

I'll attach the log file that it claims.
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2003-02-13 03:38:42 UTC
Created attachment 8220 [details]
epatch log file
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2003-02-16 15:17:01 UTC
Ok, known quirk of patch.  If you did for example the same with the
'--dry-run' added, you would have gotten the mess to the bottom.  This
is caused by the fact that the author of the patch prob added additional
'hunks' to Makefile at the bottom of the patch that need some of the previous
'hunks'.  Because these changes are not commited, the dry-run fails.

I have however fixed epatch to handle this cases better.  You should
get it in cvs revision 1.19 of eutils.eclass.

To fix this whole problem, you will have to regen this patch.

------------------------------------------------------------------------------
nosferatu djbdns-1.05 # patch  --dry-run -p1 <../djbdns-1.05-ipv6-gentoo.diff 
patching file FILES
patching file Makefile
Hunk #5 succeeded at 329 (offset 4 lines).
Hunk #7 succeeded at 419 (offset 4 lines).
Hunk #9 succeeded at 534 (offset 4 lines).
Hunk #11 succeeded at 688 (offset 4 lines).
Hunk #13 succeeded at 766 (offset 4 lines).
Hunk #15 succeeded at 840 (offset 4 lines).
Hunk #17 succeeded at 890 (offset 4 lines).
Hunk #19 succeeded at 1086 (offset 4 lines).
Hunk #21 succeeded at 1175 (offset 4 lines).
Hunk #23 succeeded at 1217 (offset 4 lines).
patching file TARGETS
patching file axfr-get.c
patching file dns.h
Hunk #2 succeeded at 44 with fuzz 1.
Hunk #3 succeeded at 71 (offset 1 line).
patching file dns_ip6.c
patching file dns_ipq6.c
patching file dns_name.c
patching file dns_nd6.c
patching file dns_rcip.c
patching file dns_resolve.c
patching file dns_sortip6.c
patching file dns_transmit.c
patching file dnscache.c
patching file dnscache.c~
patching file dnsfilter.c
patching file dnsip6.c
patching file dnsip6q.c
patching file dnsname.c
patching file dnsq.c
patching file fmt_xlong.c
patching file haveip6.h1
patching file haveip6.h2
patching file haven2i.h1
patching file haven2i.h2
patching file hier.c
patching file ip6.h
patching file ip6_fmt.c
patching file ip6_scan.c
patching file log.c
patching file okclient.c
patching file printrecord.c
patching file qlog.c
patching file query.c
patching file query.h
patching file roots.c
patching file scan_xlong.c
patching file server.c
patching file sockaddr_in6.h1
patching file sockaddr_in6.h2
patching file socket.h
patching file socket_accept6.c
patching file socket_bind.c
patching file socket_bind6.c
patching file socket_connect6.c
patching file socket_getifidx.c
patching file socket_noipv6.c
patching file socket_recv6.c
patching file socket_send6.c
patching file socket_tcp6.c
patching file socket_udp6.c
patching file tdlookup.c
patching file tinydns-conf.c
patching file tinydns-data.c
patching file tinydns-edit.c
patching file tryip6.c
patching file tryn2i.c
patching file trysa6.c
patching file Makefile
Hunk #1 succeeded at 312 (offset -20 lines).
Hunk #2 FAILED at 835.
Hunk #3 succeeded at 825 with fuzz 1 (offset -46 lines).
Hunk #4 succeeded at 855 with fuzz 1 (offset -24 lines).
Hunk #5 succeeded at 841 with fuzz 1 (offset -50 lines).
Hunk #6 succeeded at 871 with fuzz 1 (offset -28 lines).
Hunk #7 succeeded at 853 with fuzz 1 (offset -54 lines).
1 out of 7 hunks FAILED -- saving rejects to file Makefile.rej
Comment 3 Seemant Kulleen (RETIRED) gentoo-dev 2003-02-18 03:21:06 UTC
works like a charm :)

thanks Az :)