Since sys-apps/portage-2.2.0_alpha121, the zsh command line completion is broken. It only completes packages which are in overlays. Reverting to sys-apps/portage-2.2.0_alpha120 fixes the problem, without even needing to restart the shell. ~» emerge --info Portage 2.2.0_alpha120 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.15-r2, 3.4.5-ck x86_64) ================================================================= System uname: Linux-3.4.5-ck-x86_64-Intel-R-_Core-TM-_i5_CPU_M_460_@_2.53GHz-with-gentoo-2.1 Timestamp of tree: Sat, 18 Aug 2012 16:30:01 +0000 ccache version 3.1.7 [disabled] app-shells/bash: 4.2_p20 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.3-r2 dev-util/ccache: 3.1.7 dev-util/cmake: 2.8.8-r3 dev-util/pkgconfig: 0.27 sys-apps/baselayout: 2.1-r1 sys-apps/openrc: 0.9.8.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.11.6 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.5.3-r2 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers) sys-libs/glibc: 2.15-r2 Repositories: gentoo enlightenment myself ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/xsessions" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps=y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.gg3.net/ http://archive.mmu.edu.my/gentoo http://ftp.kaist.ac.kr/pub/gentoo/" LANG="en_US.UTF8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en en_US" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="-z" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/enlightenment /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac accessibility acl acpi akonadi alsa amd64 bash-completion berkdb branding bzip2 cairo cdda cddb cdr cli consolekit cracklib crypt cups curl curlwrappers cxx dbus djvu dri dts dvd dvdr encode exif fam fbcon ffmpeg flac fontconfig ftp fuse g3dvl gdbm gif gnutls gphoto2 gpm gstreamer gtk iconv ieee1394 imagemagick jpeg lame latex lcms ldap libsamplerate lzma mad mmap mmx mmx2 mng modules mp3 mp4 mpeg mudflap multilib musepack ncurses networkmanager nls nptl ogg opengl openmp oss pam pango pch pcmcia pcre pdf plasma png policykit ppds pppd qt3support qt4 readline replaygain samba savedconfig sdl session smp speex spell sqlite srt sse sse2 ssl ssse3 svg system-sqlite taglib tcpd theora threads tiff truetype udev udisks unicode upower usb v4l v4l2 vdpau vim-syntax vorbis wicd wifi wmf x264 xattr xcf xcomposite xft xinerama xml xosd xpm xv xvid yv12 zeroconf zlib zsh-completion" ALSA_CARDS="hda-intel" 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="sheets stage words" CAMERAS="*" 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 keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia vesa" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Just chiming in to say I'm experiencing broken completion for emerge in alpha121 as well. It only showed a small subset of packages for completion. It may well have been only packages from overlays. Downgrading to alpha120 fixed it for me as well.
It probably broke because portage-2.2.0_alpha121 no longer installs the /etc/make.globals symlink. If so, then zsh-completion needs to be updated to use /usr/share/portage/config/make.globals directly. As a temporary workaround, you can create a compatibility symlink like this: ln -s /usr/share/portage/config/make.globals /etc/make.globals
Actually, not only /etc/make.globals is hardcoded on many places, but also /etc/make.conf is hardcoded, although /etc/portage/make.conf should be used instead if available. A perhaps faster and certainly cleaner solution, which however requires an additional dependency, is to use `eix --print VAR`. To avoid unnecessary calls and to avoid cutting off trailing newlines through `...` one could use this in a function like this: ReadVar() { [[ -n ${(P)1} ]] && return eval $1'=${$(PRINT_APPEND=X eix --print $1)%X}' } Example usage: ReadVar PORTDIR_OVERLAY || echo "PORTDIR_OVERLAY is not defined"
fixed in zsh-completions trunk and I've also created 0.6.1 tag. So, you can bump ebuild to use 0.6.1 and be happy. Also, > A perhaps faster and certainly cleaner solution, which however requires an additional dependency, is to use `eix --print VAR`. I have not sure if it is acceptable to require eix for completions... Maybe, when eix will be portage's part — I'll rewrite completion, but now — I've not best idea than sourcing.
(In reply to comment #4) > fixed in zsh-completions trunk and I've also created 0.6.1 tag. So, you can > bump ebuild to use 0.6.1 and be happy. zsh-completions is not the same as app-shells/zsh-completion.
(In reply to comment #5) > (In reply to comment #4) > > fixed in zsh-completions trunk and I've also created 0.6.1 tag. So, you can > > bump ebuild to use 0.6.1 and be happy. > > zsh-completions is not the same as app-shells/zsh-completion. it is. I just misspelled in package name (and don't know before. that someone created double-package). And I talked about https://github.com/zsh-users/zsh-completions/issues/98 (and also app-shells/zsh-completion-99999999 ebuild in my overlay, that currently using this repo (previously it was just fork of app-shells/zsh-completion with my fixes (since it looked like dead), but then I merged gentoo-completions to zsh-users organization on GH)), since repo [for a long time] includes [commited and already fixed by me] completions from last app-shells/zsh-completion. And, as I said before, repo has non-date version tags (0.6.1, currently), so it is possible to change version numeration to human-readable. Or, did you mean, that app-shells/zsh-completion MUST contain ONLY gentoo-related zsh's completions?
I installed zsh-completion-0.7.0 using the ebuild from here: http://gpo.zugaina.org/app-shells/zsh-completions and then deleted ~/.zcompdump* and still it couldn't complete package names. I removed this package and restored make.globals and completion worked.
Created attachment 329902 [details, diff] Fixed zsh-completion Fixed _gentoo_packages and _portage_utils for changes to location of make.conf and lack of /etc/make.globals symlink Basically what mva did, but their files appear to be very different from the ones in the official repo.
(In reply to comment #7) > I installed zsh-completion-0.7.0 using the ebuild from here: > http://gpo.zugaina.org/app-shells/zsh-completions and then deleted > ~/.zcompdump* and still it couldn't complete package names. I removed this > package and restored make.globals and completion worked. Yes, because this ebuild uses the completions delivered by zsh-completion (without s) and drops the one from zsh-completions (with s) to avoid collisions. I thought they were just copied over, but apparently they weren't. Is zsh-completions on gh the successor of gentoo's zsh-completion?
(In reply to comment #9) > Is zsh-completions on gh the successor of gentoo's zsh-completion? Partially. Firstly it was just 9999 version from gentoo-projects (to use up-to-date completion). Then it becomes my own fork of that (since original zsh-comp-9999 became orphaned (no commits for few years). At this time I already added few completions, that not currently included in gentoo's zsh-comp. And then guys from gh://zsh-users organization suggest me to merge my gentoo completions to their featured completions repo. And some time after that I've migrated completions in gh://zsh-completions to fix this, #431958, bug.
I'm confirming this bug too, on all my machines. The make.globals symlink improves things. Is there an ebuild that fixes this in an overlay?
(In reply to comment #11) > I'm confirming this bug too, on all my machines. The make.globals symlink > improves things. > Is there an ebuild that fixes this in an overlay? my zsh-completion (from mva repo) is fixed, but it (as mentioned above) installs not only gentoo-related zsh-completions.
(In reply to comment #12) > my zsh-completion (from mva repo) is fixed, but it (as mentioned above) > installs not only gentoo-related zsh-completions. Thanks, I added the mva overlay, unmasked and installed zsh-completion-99999999, and it seems to work. First it didn't work for some names (e.g. alsa), but after I re-logged in, it was fine. Hope it gets fixed in portage soon.
Any ETA on when the fix will be in portage? I set up a new system and was again bitten by this. This bug seems to have been fixed upstream: http://git.overlays.gentoo.org/gitweb/?p=proj/zsh-completion.git;a=commitdiff;h=d9a4597e38afe9cafd90683e75cc87a837e3cbab Only requires packaging now IMHO.
Fixed in 20130808.