There is extra garbage at the beginning of /usr/portage/dev-tcltk/itk/files/itk-3.4_pre20090417-install.patch which causes the patch operation to fail. Also, the path-to-source in the patch file is wrong. @@ -, +, @@ itk/Makefile.in | 2 +- itk/configure.in | 23 +++++++++++++++++++++++ itk/itkConfig.sh.in | 28 +++++++++++----------------- 3 files changed, 35 insertions(+), 18 deletions(-) --- a/itk/Makefile.in +++ a/itk/Makefile.in @@ -395,7 +395,7 @@ install-lib-binaries: fi; \ done $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir) - : $(INSTALL_DATA) itkConfig.sh $(DESTDIR)$(libdir) + $(INSTALL_DATA) itkConfig.sh $(DESTDIR)$(libdir) #======================================================================== # Install binary executables (e.g. .exe files) ... * Applying itk-3.4_pre20090417-install.patch ... * Failed Patch: itk-3.4_pre20090417-install.patch ! * ( /usr/portage/dev-tcltk/itk/files/itk-3.4_pre20090417-install.patch ) * * Include in your bugreport the contents of: * * /var/tmp/portage/dev-tcltk/itk-3.4_pre20090417-r1/temp/itk-3.4_pre20090417-install.patch.out If the first five lines are removed, the patch successfully applies manually with -p1, and ebuild prepare succeeds after updating manifest. Reproducible: Always Steps to Reproduce: 1. Try to emerge normally. Patch fails. 2. Delete first five lines of /usr/portage/dev-tcltk/itk/files/itk-3.4_pre20090417-install.patch. 3. cd to /var/tmp/portage/dev-tcltk/itk-3.4_pre20090417-r1/work and patch -p1 --dry-run < /usr/portage/dev-tcltk/itk/files/itk-3.4_pre20090417-install.patch. Patch now succeeds. 4. Package can now be successfully merged, after an ebuild manifest. Portage 2.1.10.3 (default/linux/amd64/10.0/desktop, gcc-4.4.5, glibc-2.12.2-r0, 3.0.0-gentoo-babylon5 x86_64) ================================================================= System uname: Linux-3.0.0-gentoo-babylon5-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.0.3 Timestamp of tree: Tue, 16 Aug 2011 05:45:01 +0000 distcc 3.1 x86_64-pc-linux-gnu [disabled] ccache version 2.4 [disabled] app-shells/bash: 4.2_p10 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.6.6-r2, 2.7.1-r1, 3.1.3-r1 dev-util/ccache: 2.4-r9 dev-util/cmake: 2.8.4-r1 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.0.3 sys-apps/openrc: 0.8.3-r1 sys-apps/sandbox: 2.4 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.5 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82 sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers) sys-libs/glibc: 2.12.2 Repositories: gentoo perl-experimental overlay-dev-robbat2 mysql x-alaric ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=amdfam10 -mfpmath=sse -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -march=amdfam10 -mfpmath=sse -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://mirror.mcs.anl.gov/pub/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo http://gentoo.cites.uiuc.edu/pub/gentoo http://gentoo.chem.wisc.edu/gentoo http://gentoo.osuosl.org http://www.gtlib.gatech.edu/pub/gentoo ftp://mirrors.rit.edu/gentoo http://mirrors.cs.wmich.edu/gentoo " LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j12" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/perl-experimental /var/lib/layman/robbat2 /var/lib/layman/mysql /var/lib/alaric" SYNC="rsync://rsync21.us.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 bash-completion berkdb branding bzip2 cairo cdda cddb cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif ffmpeg firefox flac fltk fortran gdbm gdu gif gpm gtk iconv id3tag imagemagick ipv6 java jpeg jpeg2k kde lcms ldap libnotify mad mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib mysql ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 readline sdl session speex spell sse sse2 ssl startup-notification svg sysfs tcpd theora threads tiff tk tools truetype udev unicode usb utils vorbis x264 xcb xml xorg xpm xulrunner xv xvid zlib" ALSA_CARDS="emu10k1 hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I just ran into the exact same problem when trying to emerge world.
I try to handle this the next days.
which version of patch are you using?
okay the problem only occurs with 2.5, but 2.6 has it fixed.
+ 28 Aug 2011; Justin Lecher <jlec@gentoo.org> + files/itk-3.4_pre20090417-install.patch: + Corrected install.patch to work with patch-2.5.9, #379467 +