Just after an emerge --sync I tried to update libtorrent and had this problem : >>> Emerging (1 of 1) net-libs/libtorrent-0.12.4 * libtorrent-0.12.4.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] * This profile has not been tested thoroughly and is not considered to be * a supported server profile at this time. For a supported server * profile, please check the Hardened project (http://hardened.gentoo.org). * This profile is merely a convenience for people who require a more * minimal profile, yet are unable to use hardened due to restrictions in * the software being used on the server. This profile should also be used * if you require GCC 4.1 or Glibc 2.4 support. If you don't know if this * applies to you, then it doesn't and you should probably be using * Hardened, instead. >>> Unpacking source... >>> Unpacking libtorrent-0.12.4.tar.gz to /var/tmp/portage/net-libs/libtorrent-0.12.4/work * Applying libtorrent-0.12.4-gcc44.patch ... * Failed Patch: libtorrent-0.12.4-gcc44.patch ! * ( /usr/portage/net-libs/libtorrent/files/libtorrent-0.12.4-gcc44.patch ) * * Include in your bugreport the contents of: * * /var/tmp/portage/net-libs/libtorrent-0.12.4/temp/libtorrent-0.12.4-gcc44.patch-18796.out * * ERROR: net-libs/libtorrent-0.12.4 failed. * Call stack: * ebuild.sh, line 49: Called src_unpack * environment, line 2900: Called base_src_unpack * environment, line 436: Called base_src_util 'all' * environment, line 480: Called base_src_util 'unpack' 'autopatch' * environment, line 474: Called epatch '/usr/portage/net-libs/libtorrent/files/libtorrent-0.12.4-gcc44.patch' * environment, line 1676: Called die * The specific snippet of code: * die "Failed Patch: ${patchname}!"; * The die message: * Failed Patch: libtorrent-0.12.4-gcc44.patch! * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/net-libs/libtorrent-0.12.4/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-libs/libtorrent-0.12.4/temp/environment'. Here is the contents of /var/tmp/portage/net-libs/libtorrent-0.12.4/temp/libtorrent-0.12.4-gcc44.patch-18796.out : ***** libtorrent-0.12.4-gcc44.patch ***** ========================================= PATCH COMMAND: patch -p0 -g0 -E --no-backup-if-mismatch < /usr/portage/net-libs/libtorrent/files/libtorrent-0.12.4-gcc44.patch ========================================= can't find file to patch at input line 4 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -Nurp libtorrent-0.12.4.old/src/torrent/poll_epoll.cc libtorrent-0.12.4/src/torrent/poll_epoll.cc |--- libtorrent-0.12.4.old/src/torrent/poll_epoll.cc 2008-10-28 06:49:47.000000000 -0500 |+++ libtorrent-0.12.4/src/torrent/poll_epoll.cc 2009-02-04 09:45:22.000000000 -0600 -------------------------- No file to patch. Skipping patch. patch: **** malformed patch at line 6: ========================================= PATCH COMMAND: patch -p1 -g0 -E --no-backup-if-mismatch < /usr/portage/net-libs/libtorrent/files/libtorrent-0.12.4-gcc44.patch ========================================= patching file src/torrent/poll_epoll.cc patch: **** malformed patch at line 6: ========================================= PATCH COMMAND: patch -p2 -g0 -E --no-backup-if-mismatch < /usr/portage/net-libs/libtorrent/files/libtorrent-0.12.4-gcc44.patch ========================================= can't find file to patch at input line 4 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -Nurp libtorrent-0.12.4.old/src/torrent/poll_epoll.cc libtorrent-0.12.4/src/torrent/poll_epoll.cc |--- libtorrent-0.12.4.old/src/torrent/poll_epoll.cc 2008-10-28 06:49:47.000000000 -0500 |+++ libtorrent-0.12.4/src/torrent/poll_epoll.cc 2009-02-04 09:45:22.000000000 -0600 -------------------------- No file to patch. Skipping patch. patch: **** malformed patch at line 6: ========================================= PATCH COMMAND: patch -p3 -g0 -E --no-backup-if-mismatch < /usr/portage/net-libs/libtorrent/files/libtorrent-0.12.4-gcc44.patch ========================================= can't find file to patch at input line 4 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -Nurp libtorrent-0.12.4.old/src/torrent/poll_epoll.cc libtorrent-0.12.4/src/torrent/poll_epoll.cc |--- libtorrent-0.12.4.old/src/torrent/poll_epoll.cc 2008-10-28 06:49:47.000000000 -0500 |+++ libtorrent-0.12.4/src/torrent/poll_epoll.cc 2009-02-04 09:45:22.000000000 -0600 -------------------------- No file to patch. Skipping patch. patch: **** malformed patch at line 6: ========================================= PATCH COMMAND: patch -p4 -g0 -E --no-backup-if-mismatch < /usr/portage/net-libs/libtorrent/files/libtorrent-0.12.4-gcc44.patch ========================================= missing header for unified diff at line 4 of patch can't find file to patch at input line 4 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -Nurp libtorrent-0.12.4.old/src/torrent/poll_epoll.cc libtorrent-0.12.4/src/torrent/poll_epoll.cc |--- libtorrent-0.12.4.old/src/torrent/poll_epoll.cc 2008-10-28 06:49:47.000000000 -0500 |+++ libtorrent-0.12.4/src/torrent/poll_epoll.cc 2009-02-04 09:45:22.000000000 -0600 -------------------------- No file to patch. Skipping patch. patch: **** malformed patch at line 6: Reproducible: Always Steps to Reproduce: 1. emerge --sync 2. emerge libtorrent 3. Actual Results: ebuild fails Expected Results: should not fail, specially for a patch required for gcc-4.4 when gcc-4.2 is not even stable for most arch
please read the bugzilla documentation before filing your next bug http://www.gentoo.org/doc/en/bugzilla-howto.xml
Works for me: * Applying libtorrent-0.12.4-gcc44.patch ... [ ok ] Please re-sync your portage tree and in case the error is gone, mark this bug as INVALID.
My bad. Dos line-endings.
This was caused by does line-endings (\r\n) in the patch instead of unix line-endings (\n). The stable version of patch doesn't cope with dos line-endings very well. + 05 Mar 2009; Peter Alfredsen <loki_val@gentoo.org> + files/libtorrent-0.12.4-gcc44.patch: + Fix dos line-endings in patch. Bug 261253. Thanks to Aelia + <diego.abelenda@gmail.com> for reporting. +