While trying to update media-gfx/imagemagick to version 6.2.9.5-r1 I get the following error: * Applying imagemagick-perl.patch ... * Failed Patch: imagemagick-perl.patch ! * ( /usr/portage/media-gfx/imagemagick/files/imagemagick-perl.patch ) * Include in your bugreport the contents of: * /var/tmp/portage/imagemagick-6.2.9.5-r1/temp/imagemagick-perl.patch-29025.out /var/tmp/portage/imagemagick-6.2.9.5-r1/temp/imagemagick-perl.patch-29025.out: ***** imagemagick-perl.patch ***** ================================== PATCH COMMAND: patch -p0 -g0 -E --no-backup-if-mismatch < /usr/portage/media-gfx/imagemagick/files/imagemagick-perl.patch ================================== patching file PerlMagick/Makefile.am Hunk #1 FAILED at 45. 1 out of 1 hunk FAILED -- saving rejects to file PerlMagick/Makefile.am.rej patching file PerlMagick/Makefile.PL.in Hunk #1 FAILED at 53. 1 out of 1 hunk FAILED -- saving rejects to file PerlMagick/Makefile.PL.in.rej ================================== PATCH COMMAND: patch -p1 -g0 -E --no-backup-if-mismatch < /usr/portage/media-gfx/imagemagick/files/imagemagick-perl.patch ================================== patching file Makefile.am Hunk #1 FAILED at 45. 1 out of 1 hunk FAILED -- saving rejects to file Makefile.am.rej can't find file to patch at input line 24 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: PerlMagick/Makefile.PL.in |=================================================================== |--- PerlMagick/Makefile.PL.in (Revision 4660) |+++ PerlMagick/Makefile.PL.in (Arbeitskopie) -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored ================================== PATCH COMMAND: patch -p2 -g0 -E --no-backup-if-mismatch < /usr/portage/media-gfx/imagemagick/files/imagemagick-perl.patch ================================== missing header for unified diff at line 5 of patch can't find file to patch at input line 5 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: PerlMagick/Makefile.am |=================================================================== |--- PerlMagick/Makefile.am (Revision 4660) |+++ PerlMagick/Makefile.am (Arbeitskopie) -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored missing header for unified diff at line 24 of patch can't find file to patch at input line 24 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: PerlMagick/Makefile.PL.in |=================================================================== |--- PerlMagick/Makefile.PL.in (Revision 4660) |+++ PerlMagick/Makefile.PL.in (Arbeitskopie) -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored ================================== emerge --info: Portage 2.1.1 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3, 2.6.16-gentoo-r13 x86_64) ================================================================= System uname: 2.6.16-gentoo-r13 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ Gentoo Base System version 1.12.5 Last Sync: Thu, 21 Sep 2006 16:20:01 +0000 ccache version 2.3 [enabled] app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.2.11-r1 dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -pipe -O2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo" CXXFLAGS="-march=k8 -pipe -O2" DISTDIR="/usr/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict" GENTOO_MIRRORS="ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo/" LANG="de_DE.utf8" LC_ALL="de_DE.utf8" LINGUAS="de" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://gateway.local/gentoo-portage" USE="amd64 X a52 aac alsa apache2 arts audiofile avi bash-completion berkdb bitmap-fonts bluetooth bzip2 cairo ccache cdb cdda cdr cdrom cjk clamav cli corba crypt ctype cups curl dbus dlloader dri dvb dvd dvdr dvdread elibc_glibc encode examples exif fam fastbuild ffmpeg firefox flac force-cgi-redirect fortran ftp gd gdbm gif gimpprint glibc-omitfp glut gmp gpm gstreamer gtk gtk2 hal httpd idn imagemagick imap innodb input_devices_keyboard input_devices_mouse ipv6 isdnlog java javacomm jpeg kde kdeenablefinal kdepim kernel_linux latex lcms libg++ linguas_de mad math mbox memlimit mhash mikmod mng motif mozilla mp3 mpeg mplayer musicbrainz mysql mythtv ncurses nls nptl nptlonly nsplugin nvidia ogg opengl oss pam pcre pda pdf pdflib perl php png pop posix ppds pppd python qt3 qt4 quicktime readline reflection sasl screen sdl session simplexml smime smp soap sockets spell spl sqlite ssl tcltk tcpd tetex theora threads timidity tokenizer truetype truetype-fonts type1-fonts udev unicode userland_GNU vcd video_cards_fbdev video_cards_nv video_cards_nvidia video_cards_vesa vim-with-x vlm vorbis xcomposite xine xml xorg xosd xprint xsl xv zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
confirmed on x86 also, same error. Cause: the patch is a DOS format file! For shame! ;)
Yep, that's why. Q&d workaround: dos2unix /usr/portage/media-gfx/imagemagick/files/imagemagick-perl.patch ebuild /usr/portage/media-gfx/imagemagick/imagemagick-6.2.9.5-r1.ebuild digest emerge --resume
Confirmed, Q&D workaround works perfectly. I would like to suggest that the miscreant responsible for checking in the patch be taken out and shot. Wouldn't it be a good idea if emerge automatically checked patches and converted when necessary?
(In reply to comment #3) > Confirmed, Q&D workaround works perfectly. I would like to suggest that the > miscreant responsible for checking in the patch be taken out and shot. > Wouldn't it be a good idea if emerge automatically checked patches and > converted when necessary? > The patch was checked in because it applied cleanly on my box AS A PART OF THE EMERGE PROCESS. I still haven't figured that one out, but be careful before you jump to conclusions. Testing and emerging newly patched ebuilds is a part of the standard process, as well as testing the resulting package. This wasn't committed lightly.
I've gone through and recreated the patch on a box that it wasn't applying on (as I said in my last post, it applied cleanly via portage on some of my boxes, so I didn't know there was a problem at the time). it is committed and should be on the mirrors by now.
*** Bug 148756 has been marked as a duplicate of this bug. ***