This is my first bugreport so dont kill me! ;) I was updating python to version 2.5, after running python-updater to see what packages that needed to be reinstalled emerge stopped working with the following error message: Calculating dependencies -Traceback (most recent call last): File "/usr/bin/emerge", line 18, in <module> retval = _emerge.emerge_main() File "/usr/lib64/portage/pym/_emerge/__init__.py", line 13662, in emerge_main myopts, myaction, myfiles, spinner) File "/usr/lib64/portage/pym/_emerge/__init__.py", line 12651, in action_build retval, favorites = mydepgraph.select_files(myfiles) File "/usr/lib64/portage/pym/_emerge/__init__.py", line 4892, in select_files expanded_atoms = self._dep_expand(root_config, x) File "/usr/lib64/portage/pym/_emerge/__init__.py", line 4710, in _dep_expand cp_set.update(db.cp_all()) File "/usr/lib64/portage/pym/portage/dbapi/porttree.py", line 576, in cp_all for y in listdir(oroot+"/"+x, EmptyOnError=1, ignorecvs=1, dirsonly=1): File "/usr/lib64/portage/pym/portage/__init__.py", line 290, in listdir list, ftype = cacheddir(mypath, ignorecvs, ignorelist, EmptyOnError, followSymlinks) File "/usr/lib64/portage/pym/portage/__init__.py", line 226, in cacheddir list = os.listdir(mypath) OSError: [Errno 12] Cannot allocate memory: '/usr/portage/sys-libs' It's not always '/usr/portage/sys-libs', it varies.. I have tried different version of portage, using this guide: http://www.gentoo.org/proj/en/portage/doc/manually-fixing-portage.xml without luck. I can't find any threads in the gentoo forum discussing this problem and with google I only find another bugreport. This bugreport (#228075) is closed and has a patch that should fix the problem. Patching portage with the patch mentioned in bug 228075 does not work for me. Reproducible: Always Portage 11401-svn (default/linux/amd64/2008.0, gcc-4.1.1, glibc-2.5-r3, 2.6.16-xen-grsec x86_64) ================================================================= System uname: Linux-2.6.16-xen-grsec-x86_64-Intel-R-_Xeon-TM-_CPU_2.80GHz-with-glibc2.2.5 Timestamp of tree: Fri, 19 Sep 2008 22:45:01 +0000 app-shells/bash: 3.2_p17 dev-java/java-config: 1.3.7, 2.0.33-r1 dev-lang/python: 2.4.4-r6, 2.5.2-r6 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r2 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=nocona -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -march=nocona -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://mirror.gentoo.no/ http://ds.thn.htu.se/linux/gentoo http://trumpetti.atm.tut.fi/gentoo/ http://mirror.uni-c.dk/pub/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/" LDFLAGS="-Wl,-O1" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes" 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" SYNC="rsync://rsync.gentoo.se/gentoo-portage" USE="amd64 apache2 bash-completion bcmath berkdb calendar cdr crypt dba dga dvd fortran ftp gd gif gpm imap jpeg libwww maildir mmx mpm-prefork multilib mysql ncurses nls pam perl php png python readline sasl sdl session slang spell ssl tclck tcpd usb vhosts x86_64 xml xml2 zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" APACHE2_MODULES="access auth auth_dbm auth_anon auth_digest alias file-cache echo charset-lite cache disk-cache mem-cache ext-filter case_filter case-filter-in deflate mime-magic cern-meta expires headers usertrack unique-id proxy proxy-connect proxy-ftp proxy-http info include cgi cgid dav dav-fs vhost-alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions userdir so" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTDIR_OVERLAY
*** This bug has been marked as a duplicate of bug 218378 ***