When I do any emerge action that involves a packages that allegedly has syntac errors, portage returns with errors. Emerging over allagedly "bad packages" (as suggested in the forum) is not possible, since portage will die while trying to calculate dependencies. Emerge actions on "good" packages work fine. Some "bad" packages include libtool and zlib. So, for example: "emerge search gnunet" works "emerge -U world" doesn't work "emerge zlib" doesn't work "emerge search xmms" doesn't work because some XMMS plugins depend on zlib. Reproducible: Always Steps to Reproduce: 1. emerge sync 2. emerge -U portage 3. emerge -p -U --debug world Actual Results: bash-2.05b# emerge -p -U --debug world >>> --upgradeonly implies --update... adding --update to options. These are the packages that I would merge, in order: Calculating world dependencies - /usr/sbin/ebuild.sh: line 1: ent: command not found /usr/sbin/ebuild.sh: line 2: variable: command not found /usr/sbin/ebuild.sh: line 3: Standard: command not found !!! ERROR: sys-libs/zlib-1.2.1-r2 failed. !!! Function , Line 1238, Exitcode 127 !!! error sourcing ebuild aux_get(): (0) Error in sys-libs/zlib-1.2.1-r2 ebuild. (256) Check for syntax error or corruption in the ebuild. (--debug) - Parent: ebuild / net-print/foomatic-3.0.0.20031018 merge Depstring: =net-print/foomatic-filters-3.0.0.20031018 =net-print/foomatic-db-engine-3.0.0.20031018 net-print/foomatic-db =net-print/foomatic-filters-3.0.0.20031018 =net-print/foomatic-db-engine-3.0.0.20031018 net-print/foomatic-db Candidates: ['=net-print/foomatic-filters-3.0.0.20031018', '=net-print/foomatic-db-engine-3.0.0.20031018', 'net-print/foomatic-db'] ebuild: net-print/foomatic-filters-3.0.0.20031018 binpkg: None \ Parent: ebuild / net-print/foomatic-filters-3.0.0.20031018 merge Depstring: samba? ( net-fs/samba ) cups? ( >=net-print/cups-1.1.19 ) samba? ( net-fs/samba ) cups? ( >=net-print/cups-1.1.19 ) Candidates: ['>=net-print/cups-1.1.19'] ebuild: net-print/cups-1.1.19-r1 binpkg: None |Exiting... ebuild / net-print/foomatic-filters-3.0.0.20031018 merge ebuild: net-print/foomatic-db-engine-3.0.0.20031018 binpkg: None / Parent: ebuild / net-print/foomatic-db-engine-3.0.0.20031018 merge Depstring: dev-libs/libxml2 net-misc/wget net-ftp/curl net-print/foomatic-filters >=dev-lang/perl-5.8.0-r12 dev-libs/libxml2 net-misc/wget net-ftp/curl net-print/foomatic-filters Candidates: ['dev-libs/libxml2', '>=dev-lang/perl-5.8.0-r12', 'net-print/foomatic-filters', 'net-ftp/curl', 'net-misc/wget'] ebuild: dev-libs/libxml2-2.5.11 binpkg: None -ebuild: dev-lang/perl-5.8.0-r12 binpkg: None \ebuild: net-print/foomatic-filters-3.0.0.20031018 binpkg: None ebuild: net-ftp/curl-7.10.7 binpkg: None |ebuild: net-misc/wget-1.9-r2 binpkg: None Exiting... ebuild / net-print/foomatic-db-engine-3.0.0.20031018 merge ebuild: net-print/foomatic-db-20031018 binpkg: None /Exiting... ebuild / net-print/foomatic-3.0.0.20031018 merge - Parent: ebuild / sys-apps/gawk-3.1.3-r1 merge Depstring: virtual/glibc nls? ( sys-devel/gettext ) !bootstrap? ( sys-devel/patch ) virtual/glibc nls? ( sys-devel/gettext ) Candidates: ['sys-devel/patch', 'virtual/glibc', 'sys-devel/gettext'] ebuild: sys-devel/patch-2.5.9 binpkg: None \ebuild: sys-libs/glibc-2.3.2-r3 binpkg: None ebuild: sys-devel/gettext-0.12.1 binpkg: None |Exiting... ebuild / sys-apps/gawk-3.1.3-r1 merge \ Parent: ebuild / media-sound/xmms-1.2.7-r23 merge Depstring: app-arch/unzip =x11-libs/gtk+-1.2* mikmod? ( >=media-libs/libmikmod-3.1.6 ) esd? ( >=media-sound/esound-0.2.22 ) xml? ( >=dev-libs/libxml-1.8.15 ) gnome? ( <gnome-base/gnome-panel-1.5.0 ) opengl? ( virtual/opengl ) oggvorbis? ( >=media-libs/libvorbis-1.0_beta4 ) !bootstrap? ( sys-devel/libtool ) !bootstrap? ( sys-devel/patch ) app-arch/unzip =x11-libs/gtk+-1.2* mikmod? ( >=media-libs/libmikmod-3.1.6 ) esd? ( >=media-sound/esound-0.2.22 ) xml? ( >=dev-libs/libxml-1.8.15 ) gnome? ( <gnome-base/gnome-panel-1.5.0 ) opengl? ( virtual/opengl ) oggvorbis? ( >=media-libs/libvorbis-1.0_beta4 ) directfb? ( dev-libs/DirectFB ) nls? ( dev-util/intltool ) Candidates: ['>=media-sound/esound-0.2.22', 'dev-util/intltool', '<gnome-base/gnome-panel-1.5.0', 'sys-devel/patch', '>=dev-libs/libxml-1.8.15', 'sys-devel/libtool', 'virtual/opengl', '>=media-libs/libvorbis-1.0_beta4', '=x11-libs/gtk+-1.2*', 'dev-libs/DirectFB', 'app-arch/unzip', '>=media-libs/libmikmod-3.1.6'] ebuild: media-sound/esound-0.2.32 binpkg: None |ebuild: dev-util/intltool-0.27.2 binpkg: None /ebuild: gnome-base/gnome-panel-1.4.2-r2 binpkg: None -ebuild: sys-devel/patch-2.5.9 binpkg: None ebuild: dev-libs/libxml-1.8.17-r2 binpkg: None \ /usr/sbin/ebuild.sh: line 1: MD5: command not found /usr/sbin/ebuild.sh: line 2: MD5: command not found /usr/sbin/ebuild.sh: line 3: MD5: command not found /usr/sbin/ebuild.sh: line 4: MD5: command not found /usr/sbin/ebuild.sh: line 5: MD5: command not found /usr/sbin/ebuild.sh: line 6: MD5: command not found /usr/sbin/ebuild.sh: line 7: MD5: command not found /usr/sbin/ebuild.sh: line 8: MD5: command not found /usr/sbin/ebuild.sh: line 9: MD5: command not found /usr/sbin/ebuild.sh: line 10: MD5: command not found /usr/sbin/ebuild.sh: line 11: MD5: command not found /usr/sbin/ebuild.sh: line 12: MD5: command not found /usr/sbin/ebuild.sh: line 13: MD5: command not found /usr/sbin/ebuild.sh: line 14: MD5: command not found /usr/sbin/ebuild.sh: line 15: MD5: command not found /usr/sbin/ebuild.sh: line 16: MD5: command not found /usr/sbin/ebuild.sh: line 17: MD5: command not found /usr/sbin/ebuild.sh: line 18: MD5: command not found /usr/sbin/ebuild.sh: line 19: MD5: command not found /usr/sbin/ebuild.sh: line 20: MD5: command not found /usr/sbin/ebuild.sh: line 21: MD5: command not found /usr/sbin/ebuild.sh: line 22: MD5: command not found /usr/sbin/ebuild.sh: line 23: MD5: command not found /usr/sbin/ebuild.sh: line 24: MD5: command not found /usr/sbin/ebuild.sh: line 25: MD5: command not found /usr/sbin/ebuild.sh: line 26: MD5: command not found /usr/sbin/ebuild.sh: line 27: MD5: command not found /usr/sbin/ebuild.sh: line 28: MD5: command not found /usr/sbin/ebuild.sh: line 29: MD5: command not found /usr/sbin/ebuild.sh: line 30: MD5: command not found /usr/sbin/ebuild.sh: line 31: MD5: command not found /usr/sbin/ebuild.sh: line 32: MD5: command not found /usr/sbin/ebuild.sh: line 33: MD5: command not found /usr/sbin/ebuild.sh: line 34: MD5: command not found /usr/sbin/ebuild.sh: line 35: MD5: command not found /usr/sbin/ebuild.sh: line 36: MD5: command not found /usr/sbin/ebuild.sh: line 37: MD5: command not found /usr/sbin/ebuild.sh: line 38: MD5: command not found /usr/sbin/ebuild.sh: line 39: MD5: command not found /usr/sbin/ebuild.sh: line 40: MD5: command not found /usr/sbin/ebuild.sh: line 41: MD5: command not found /usr/sbin/ebuild.sh: line 42: MD5: command not found /usr/sbin/ebuild.sh: line 43: MD5: command not found /usr/sbin/ebuild.sh: line 44: MD5: command not found /usr/sbin/ebuild.sh: line 45: MD5: command not found /usr/sbin/ebuild.sh: line 46: MD5: command not found /usr/sbin/ebuild.sh: line 47: MD5: command not found /usr/sbin/ebuild.sh: line 48: MD5: command not found /usr/sbin/ebuild.sh: line 49: MD5: command not found /usr/sbin/ebuild.sh: line 50: MD5: command not found /usr/sbin/ebuild.sh: line 51: MD5: command not found /usr/sbin/ebuild.sh: line 52: MD5: command not found /usr/sbin/ebuild.sh: line 53: MD5: command not found /usr/sbin/ebuild.sh: line 54: MD5: command not found /usr/sbin/ebuild.sh: line 55: MD5: command not found !!! ERROR: sys-devel/libtool-1.4.3-r3 failed. !!! Function , Line 1238, Exitcode 127 !!! error sourcing ebuild aux_get(): (0) Error in sys-devel/libtool-1.4.3-r3 ebuild. (256) Check for syntax error or corruption in the ebuild. (--debug) !!! all ebuilds that could satisfy "sys-devel/libtool" have been masked. !!! (dependency required by "media-sound/xmms-1.2.7-r23" [ebuild]) !!! Problem with ebuild media-sound/xmms-1.2.7-r23 !!! Possibly a DEPEND/*DEPEND problem. !!! Depgraph creation failed. Expected Results: Listed the packages that may be upgraded. Portage 2.0.49-r20 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r3, 2.4.20-xfs-r3) ================================================================= System uname: 2.4.20-xfs-r3 i686 Celeron (Covington) Gentoo Base System version 1.4.3.10p1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium2 -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/gconf /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X Xaw3d aalib afs alsa apache2 apm arts avi berkdb bonobo cdr cjk crypt cups dga directfb encode esd fastcgi fbcon flash foomaticdb freetds gd gdbm ggi gif gnome gpm gstreamer gtk gtk2 gtkhtml imlib innodb java joystick jpeg junit kde ldap libg++ libwww mad mbox mcal memlimit mikmod mmx motif mozilla mpeg mpi mysql ncurses nls nocarbus oggvorbis opengl oss pam pdflib perl plotutils png postgres ppds python qt quicktime readline ruby sdl slang slp spell sse ssl svga tcltk tcpd tetex tiff truetype usb videos wmf wxwindows x86 xinerama xml xml2 xmms xosd xv zlib"
that looks like a broken tree
As Marius said. Reopen if sync'ing a fresh tree doesn't fix it.
Turns out the bug went away by simply rebooting the machine - whether or not this was incidental is uncertain. The reboot was the first reboot since upgrading portage from r19 to r20. I did not the portage rescue program. If a reboot is necessary to sync, fix, or whatever a damaged portage tree, this could be a problem that needs to be addressed in future releases of portage.