equery hasuse -p gtk [ Searching for USE flag gtk in all categories among: ] * installed packages * Portage tree (/usr/portage) Traceback (most recent call last): File "/usr/bin/equery", line 1639, in ? cmd.perform(local_opts) File "/usr/bin/equery", line 1425, in perform matches = package_finder(filter_fn) File "/usr/lib/gentoolkit/pym/gentoolkit/helpers.py", line 129, in find_all_packages return [Package(x) for x in t2] File "/usr/lib/gentoolkit/pym/gentoolkit/package.py", line 24, in __init__ raise FatalError("invalid cpv: %s" % cpv) gentoolkit.errors.FatalError: <gentoolkit.errors.FatalError instance at 0x1cf9a70> Portage 2.1.2_rc3-r7 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo-r1 x86_64) ================================================================= System uname: 2.6.18-gentoo-r1 x86_64 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz Gentoo Base System version 1.12.7 Last Sync: Tue, 19 Dec 2006 14:30:01 +0000 dev-lang/python: 2.4.4 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61 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 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -ggdb" 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/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -ggdb" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms splitdebug strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.UTF-8" LINGUAS="en nl" 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="/home/marijn/overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 X aac acpi alsa berkdb bitmap-fonts cli cracklib crypt cups dlloader dri dts dvd dvdr dvdread elibc_glibc fortran gdbm gif gpm gtk iconv input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog jpeg kde kdeenablefinal kernel_linux libg++ linguas_en linguas_nl lm_sensors mad mng mp3 ncurses nls nptl nptlonly nvidia offensive opengl pam pcre pdf perl png ppds pppd python readline reflection session smp spl ssl svg tcpd theora truetype-fonts type1-fonts udev unicode userland_GNU video_cards_fbdev video_cards_nv video_cards_nvidia vorbis xinerama xorg xv zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Works for me here. You may have a corrupted portage tree. Please apply the attached patch which will print out the offending package name by doing the following: cd /usr/lib/gentoolkit/pym/gentoolkit patch < /path/to/package.py.patch We can then hopefully use that to track down what is causing the issue.
Created attachment 104369 [details, diff] package.py debug patch
It finds "invalid cpv: games-strategy/ufo-ai-2.0rc5" which is in my local overlay. But it shouldn't search there without my asking for it with "-o". It's not installed either. equery hasuse -p gtk [ Searching for USE flag gtk in all categories among: ] * installed packages * Portage tree (/usr/portage) invalid cpv: games-strategy/ufo-ai-2.0rc5 Traceback (most recent call last): File "/usr/bin/equery", line 1639, in ? cmd.perform(local_opts) File "/usr/bin/equery", line 1425, in perform matches = package_finder(filter_fn) File "/usr/lib/gentoolkit/pym/gentoolkit/helpers.py", line 129, in find_all_packages return [Package(x) for x in t2] File "/usr/lib/gentoolkit/pym/gentoolkit/package.py", line 25, in __init__ raise FatalError("invalid cpv: %s" % cpv) gentoolkit.errors.FatalError: <gentoolkit.errors.FatalError instance at 0x1d20710>
The way portage is currently designed, there is no overlay distinction when searching for packages in the portage tree. You basically have the portage tree (which is comprised of everything in $PORTDIR and $PORTDIR_OVERLAY) and the vardb tree (which is comprised of everything in /var/db/pkg). So equery is going to search the overlay for packages even though you didn't ask it to print out results from the overlay. The solution is to fix the bad package in the overlay. The name should be games-strategy/ufo-ai-2.0_rc5 Alternatively, you can run the command using the following: env PORTDIR_OVERLAY="" equery hasuse gtk That will prevent portage from looking at the packages in your overlay.
Marking as invalid since the issue was caused by a bad ebuild name in a local overlay.
Ok thanks, instead of crashing though, equery should give an error and continue to the next package. Independent of whether it supports overlays correctly.