Upgraded my system and noticed that the old mail-x will not remove. Portage attempts to remove it after every merge unsucessfully. Reproducible: Always Steps to Reproduce: 1. Emerge anything. 2. 3. Actual Results: >>> Auto-cleaning packages ... mail-client/mailx selected: 8.1.2.20021129-r2 protected: 8.1.2.20021129-r4 omitted: none >>> 'Selected' packages are slated for removal. >>> 'Protected' and 'omitted' packages will not be removed. >>> Waiting 5 seconds before starting... >>> (Control-C to abort)... >>> Unmerging in: 5 4 3 2 1 >>> Unmerging mail-client/mailx-8.1.2.20021129-r2... No package files given... Grabbing a set. QA Notice: ECLASS 'ccc' inherited illegally in mail-client/mailx-8.1.2.20021129- r2 QA Notice: ECLASS 'flag-o-matic' inherited illegally in mail-client/mailx-8.1.2. 20021129-r2 QA Notice: ECLASS 'eutils' inherited illegally in mail-client/mailx-8.1.2.200211 29-r2 QA Notice: ECLASS 'multilib' inherited illegally in mail-client/mailx-8.1.2.2002 1129-r2 QA Notice: ECLASS 'toolchain-funcs' inherited illegally in mail-client/mailx-8.1 .2.20021129-r2 /usr/lib/portage/bin/ebuild.sh: /var/db/pkg/mail-client/mailx-8.1.2.20021129-r2/ mailx-8.1.2.20021129-r2.ebuild: line 43: unexpected EOF while looking for matchi ng `"' /usr/lib/portage/bin/ebuild.sh: /var/db/pkg/mail-client/mailx-8.1.2.20021129-r2/ mailx-8.1.2.20021129-r2.ebuild: line 70: syntax error: unexpected end of file !!! ERROR: mail-client/mailx-8.1.2.20021129-r2 failed. !!! Function , Line 1686, Exitcode 1 !!! error sourcing ebuild !!! If you need support, post the topmost build error, NOT this status message. !!! FAILED prerm: 1 Expected Results: Removed the old mailx. Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.11-rc2 i686) ================================================================= System uname: 2.6.11-rc2 i686 Intel(R) Pentium(R) M processor 1400MHz Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4 [2.3.4 (#1, Jan 27 2005, 07:10:27)] dev-lang/python: 2.3.4 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.5, 1.6.3, 1.8.5-r2, 1.4_p6, 1.9.4, 1.7.9 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.4.3-r4, 1.5.10-r4 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium-m -O3 -mmmx -msse -msse2 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /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/ /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="x86 3dnow X aalib acl acpi alsa apache2 apm avi berkdb bitmap-fonts cdr crypt cups dvd encode esd f77 fam flac font-server foomaticdb fortran gdbm gif gnome gpg gpm gstreamer gtk gtk2 imagemagick imlib ipv6 jpeg libg++ libwww mad mikmod motif mozilla mpeg mysql ncurses nls nptl oggvorbis opengl oss pam pcmcia pdflib perl png python quicktime readline samba sdl slang snmp spell sse sse2 ssl svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts xml2 xmms xv zlib video_cards_radeon" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Try going into /var/db/pkg/mail-client/mailx and opening .ebuild sitting there. Look for a line that contains a weird unprintable character (some editors display it as ^A) and change it into a quote ("). This is a known bug in portage that has been fixed sometimes after you emerged mailx.
*** This bug has been marked as a duplicate of 54121 ***