Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 241132 - emerge --info can't handle ambiguous packages, gives TraceBack
Summary: emerge --info can't handle ambiguous packages, gives TraceBack
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Portage team
Keywords: InVCS
Depends on:
Blocks: 210077 216231
  Show dependency tree
Reported: 2008-10-10 17:56 UTC by Murph
Modified: 2010-08-06 08:56 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Murph 2008-10-10 17:56:38 UTC
"emerge --info package" on an ambiguous package name will give a traceback.

For example, on my system, 'gcc' is ambiguous (crossdev), so "

Reproducible: Always

Steps to Reproduce:
1. On my system, 'gcc' is ambiguous (crossdev)
2. emerge -pv gcc <-- verify that it's ambiguous
3. emerge --info gcc <-- will traceback at end.

Actual Results:  
At end of most emerge --info output (variables and stuff):

Traceback (most recent call last):
  File "/usr/bin/emerge", line 18, in <module>
    retval = _emerge.emerge_main()
  File "/usr/lib64/portage/pym/_emerge/", line 13989, in emerge_main
    action_info(settings, trees, myopts, myfiles)
  File "/usr/lib64/portage/pym/_emerge/", line 11949, in action_info
  File "/usr/lib64/portage/pym/portage/dbapi/", line 913, in match
    origdep, mydb=self, use_cache=use_cache, settings=self.settings)
  File "/usr/lib64/portage/pym/portage/", line 6379, in dep_expand
    use_cache=use_cache, settings=settings)
  File "/usr/lib64/portage/pym/portage/", line 6617, in cpv_expand
    raise ValueError, matches
ValueError: ['cross-avr/gcc', 'sys-devel/gcc']

# emerge --info
Portage 2.2_rc12 (default/linux/amd64/2008.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.26-gentoo-r1-murph x86_64)
System uname: Linux-2.6.26-gentoo-r1-murph-x86_64-Intel-R-_Core-TM-2_CPU_6700_@_2.66GHz-with-glibc2.2.5
Timestamp of tree: Fri, 10 Oct 2008 16:18:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r8
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.26
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=nocona -pipe -fomit-frame-pointer -O2"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.1/env /usr/kde/4.1/share/config /usr/kde/4.1/shutdown /usr/share/config /var/lib/hsqldb"
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/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -pipe -fomit-frame-pointer -O2"
FEATURES="ccache distlocks parallel-fetch preserve-libs protect-owned sfperms strict unmerge-orphans userfetch"
LINGUAS="en ja hi ko"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/usr/local/portage/layman/kde-testing /usr/local/portage"
USE="16bit 3dnow 3dnowext 3ds 64bit 7zip X a52 aac aalib acl acpi additions aim aimextras alsa amarok amd amd64 amr ao asf bash-completion berkdb bl bluetooth bzip2 c++ cairo calendar canna cap ccache cdda cddb cdinstall cdrom cg chroot cid cjk cli cpudetection cracklib crypt css curl dbus dga dio divx divx4linux dri dv dvb dvd dvdnav dvdr dvdread dvi emacs encode ethereal fbcon ffmpeg firefox flac flash fontconfig fortran ftp fuse gd gdbm gif gimp git glep glitz glx gmail gmailtimestamps gmedia gpm gstreamer gstreamer010 gtalk gtk gtk2 gtkhtml gtkspell gzip hal hddtemp hpn html http httpd hub iconv icq id3 ieee1394 imagemagick immqt-bc insecure-drivers insecure-savers ipod irc isdnlog j2ee jabber java java5 javascript jikes jp2 jpeg kde kdepim kdeprefix kqemu lame latex lcd libcaca lirc lm_sensors logitech-mouse mad madwifi mastroka math matroska mcal mccp midi mikmod mjpeg mmx mmxext mng mp3 mp4 mp4live mpeg mpeg2 mpeg4 mplayer mplayer-bin msn mtp mudflap multilib multitarget musicbrainz ncurses nepomuk nfs nls nptl nptlonly nsplugin ntfs ntlm ntlm_unsupported_patch nvidia oav odbc offensive ogg openal opengl openmp openssl pam pcre pdf perl plasma png pppd python qt3 qt3support qt4 quicktime rar rdesktop readline realmedia reflection regex reiserfs samba sdl semantic-desktop session smp sms spell spl sqlite sqlite3 srt sse sse-filters sse2 ssl ssse3 svg sysfs szip taglib tcpd tetex theora threads threadsafe tiff transcode truetype type1 unicode urandom usb utf8 v4l v4l2 vcd vorbis wifi wma wmf wmp x264 xcomposite xine xinerama xml xorg xrandr xscreensaver xulrunner xv xvid 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ja hi ko" LIRC_DEVICES="mceusb2" USERLAND="GNU" VIDEO_CARDS="nvidia"
Comment 1 Murph 2008-10-10 18:00:20 UTC
Sorry  emerge --info spam. Probably should have attached that? it says to paste it there. Actually, this additional comments box says "put emerge --info here" too. hrm.

Anyways, people on IRC verified the traceback on as well.
Comment 2 Zac Medico gentoo-dev 2008-10-10 20:26:12 UTC
Thanks, this is fixed in svn r11671.
Comment 3 Zac Medico gentoo-dev 2008-11-02 01:01:23 UTC
This is fixed in 2.2_rc13.
Comment 4 Dennis Schridde 2010-08-05 18:38:29 UTC
I think this is back in 2.2_rc67:

$ emerge --info binutils
!!! The short ebuild name "binutils" is ambiguous.  Please specify one of
!!! the following fully-qualified ebuild names instead:
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/_emerge/", line 1506, in emerge_main
    dep_expand(x, mydb=vardb, settings=settings))
  File "/usr/lib64/portage/pym/portage/dbapi/", line 47, in dep_expand
    use_cache=use_cache, settings=settings)
  File "/usr/lib64/portage/pym/portage/dbapi/", line 80, in cpv_expand
    raise AmbiguousPackageName(matches)
portage.exception.AmbiguousPackageName: ['cross-i686-pc-linux-gnu/binutils', 'cross-i686-pc-mingw32/binutils', 'sys-devel/binutils']

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/emerge", line 42, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/", line 1515, in emerge_main
    for i in e[0]:
TypeError: 'AmbiguousPackageName' object does not support indexing
Comment 5 Zac Medico gentoo-dev 2010-08-05 22:26:03 UTC
(In reply to comment #4)
It's a slightly different issue that's only triggered with python3. Now it's fixed in git:;a=commit;h=7606baaf099a9ea209507a677fcc60077d390052
Comment 6 Dennis Schridde 2010-08-06 08:56:42 UTC
(In reply to comment #5)
> (In reply to comment #4)
> It's a slightly different issue that's only triggered with python3. Now it's
> fixed in git: