When I try to: emerge --newuse world I get the following errors: Code: # emerge --newuse world >>> --newuse implies --update... adding --update to options. These are the packages that would be merged, in order: Calculating world dependencies -Traceback (most recent call last): File "/usr/bin/emerge", line 4049, in ? emerge_main() File "/usr/bin/emerge", line 4044, in emerge_main myopts, myaction, myfiles, spinner) File "/usr/bin/emerge", line 3457, in action_build if not mydepgraph.xcreate(myaction): File "/usr/bin/emerge", line 1260, in xcreate if not self.select_dep( File "/usr/bin/emerge", line 1189, in select_dep myuse=selected_pkg[-1]): File "/usr/bin/emerge", line 765, in create old_iuse = set(vardbapi.aux_get(mykey, ["IUSE"])[0].split()) File "/usr/lib/portage/pym/portage.py", line 4299, in aux_get myf = open(myfn, "r") IOError: [Errno 21] Is a directory This is a new install with 2006.1 and I am using the latest version of portage (2.1.1-r1). I also tried reinstalling portage and this did not fix the problem. I can do everything else with emerge so this is specific to emerge --newuse. I also tried emerge --metadata to see if this would fix the problem. # emerge --info Portage 2.1.1-r1 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r8 x86_64) ================================================================= System uname: 2.6.17-gentoo-r8 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4800+ Gentoo Base System version 1.12.5 Last Sync: Sat, 30 Sep 2006 17:30:01 +0000 app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.2.11-r1 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] 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 -O2 -pipe" 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" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo" CXXFLAGS="-march=k8 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ " MAKEOPTS="-j3" 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://rsync.gentoo.org/gentoo-portage" USE="amd64 X a52 aac aalib ada alsa berkdb bitmap-fonts cdr cli crypt cups divx dlloader dri dvd elibc_glibc fortran gdbm gif gpm hal imagemagic input_devices_keyboard input_devices_mouse ipv6 isdnlog jpeg jpeg2k kde kernel_linux libg++ ncurses nls nptl nptlonly nsplugin ogg pam pcre perl png ppds pppd python qt readline reflection samba session smp speex spell spl ssl tcpd threads tiff truetype-fonts type1-fonts udev unicode userland_GNU vcd video_cards_nvidia vorbis xinerama xorg xvid zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
It seems that you have a directory that doesn't belong there. You can use this command to find such a directory: find /var/db/pkg -type d -mindepth 3 -maxdepth 3
I ran fsck on the /var partition and it found and fixed somethings including removing one bad directory. emerge --newuse now works. Thanks.