Recently i played around with portageq and found a very easy way to let it crash :) It happens with portage 2.1.9.42 (stable) on amd64 + amd64-hardened and with portage 2.1.10.3 (unstable) on x86. When i type: g86 ~ # portageq all_best_visible ill get a nice traceback. I know that they are parameters missing, but i guess a crash is not the best way to let me know that :) Reproducible: Always Steps to Reproduce: 1. portageq all_best_visible Actual Results: ERROR: insufficient parameters! Traceback (most recent call last): File "/usr/bin/portageq", line 776, in <module> main() File "/usr/bin/portageq", line 757, in main retval = function(args) File "/usr/bin/portageq", line 468, in all_best_visible for pkg in portage.db[argv[0]]["porttree"].dbapi.cp_all(): IndexError: list index out of range Expected Results: ERROR: insufficient parameters! (like with "portageq get_repos") emerge --info: Portage 2.1.9.42 (default/linux/amd64/10.0/no-multilib, gcc-4.4.5, libc-0-r0, 2.6.39-gentoo-r1 x86_64) ================================================================= System uname: Linux-2.6.39-gentoo-r1-x86_64-Intel-R-_Core-TM-2_CPU_6600_@_2.40GHz-with-gentoo-2.0.2 Timestamp of tree: Thu, 16 Jun 2011 04:45:01 +0000 app-shells/bash: 4.1_p9 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.1-r1, 3.1.3-r1 dev-util/cmake: 2.8.4-r1 sys-apps/baselayout: 2.0.2 sys-apps/openrc: 0.8.2-r1 sys-apps/sandbox: 2.4 sys-devel/autoconf: 2.65-r1 sys-devel/automake: 1.9.6-r3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.5 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.82 sys-kernel/linux-headers: 2.6.36.1 sys-libs/glibc: 2.12.2 virtual/os-headers: 0 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA AdobeFlash-10.1 PUEL ut2003 dlj-1.1" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -march=native -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs candy distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="de_DE.utf8" LDFLAGS="-Wl,-O1,--hash-style=gnu,--as-needed" LINGUAS="de zh_CN zh_TW" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" 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" PORTDIR_OVERLAY="/media/overlays/local /media/overlays/layman/sunrise /media/overlays/layman/x11 /media/overlays/layman/multimedia" SYNC="rsync://192.168.2.60/gentoo-portage" USE="X acl akonadi alsa amd64 berkdb bzip2 cdr cli consolekit cracklib crypt cups custom-cflags custom-optimizations cxx dbus dri dvd dvdr dvdread exif fortran gallium gdbm gif gnutls gpm iconv ipv6 jpeg kde kipi lm_sensors lzma mad mmx mmxext mng modules mp3 mudflap ncurses nls nptl nptlonly opengl openmp pam pcre perl phonon png policykit pppd python qt3support qt4 readline sasl sdl semantic-desktop session spell sse sse2 ssl ssse3 sysfs tcpd tiff truetype udev unicode v4l2 vorbis vpx xcomposite xinerama xml xorg xv 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="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de zh_CN zh_TW" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" SANE_BACKENDS="net niash" USERLAND="GNU" VIDEO_CARDS="radeon r300" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Thanks, this is fixed in git: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fed6021192dd59eda1f6b9f3fb227597a83870de
This is in 2.2.0_alpha42, but I'll leave this bug open until it's in an unmasked release.
This is fixed in 2.1.10.4.