app-shells/gentoo-bashcomp is necessary for bash completion; yet, when bash-completion is turned on, gentoo-bashcomp is never pulled in by eselect, which has a module that needs it to properly insert itself into the bash environment. Reproducible: Always Steps to Reproduce: Something like this: 1. USE="bash-completion" emerge eselect 2. eselect bashcomp enable --global eselect 3. (reload bash, try to use "eselect <tab><tab>" and note the lack of useful help) 4. emerge gentoo-bashcomp 5. (now it works) $ emerge --info Portage 2.1.6.13 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.32-gentoo-r1 x86_64) ================================================================= System uname: Linux-2.6.32-gentoo-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8800_@_2.66GHz-with-gentoo-2.0.1 Timestamp of tree: Thu, 31 Dec 2009 02:00:02 +0000 ccache version 2.4 [enabled] app-shells/bash: 4.0_p35 dev-java/java-config: 2.1.9-r2 dev-lang/python: 2.6.4 dev-python/pycrypto: 2.1.0_beta1 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.6.4-r3 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.6.0 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.7.9-r1, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=core2 -msse4.1" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" 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 /etc/udev/rules.d" CXXFLAGS="-O2 -pipe -march=core2 -msse4.1" DISTDIR="/usr/portage/distfiles" FEATURES="ccache collision-protect distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="en" 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="/usr/local/portage/layman/sunrise /usr/local/portage/layman/gnome /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa amd64 avahi bash-completion berkdb bluetooth branding bzip2 cairo cdr cjk cli consolekit cracklib crypt cups cxx dbus divx dri dts dvd dvdr eds emboss encode evo fam firefox flac fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 jpeg laptop ldap libnotify lm_sensors mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses networkmanager nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png ppds pppd pulseaudio python quicktime readline reflection samba sdl session spell spl sse sse2 ssl startup-notification svg sysfs syslog tcpd theora thunar tiff truetype unicode usb vorbis x264 xml xorg xulrunner xv xvid zlib" 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 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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa fbdev" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
(In reply to comment #0) > Steps to Reproduce: > Something like this: > 1. USE="bash-completion" emerge eselect > 2. eselect bashcomp enable --global eselect > 3. (reload bash, try to use "eselect <tab><tab>" and note the lack of useful > help) > 4. emerge gentoo-bashcomp > 5. (now it works) It is not that I don't believe you but given that gentoo-bashcomp is just 3 useful files[1]. They actually won't do anything unless you enable them like you do for eselect completion. For what its worth, they don't have anything to do with eselect completion either. [1]: %% qlist gentoo-bashcomp /usr/share/doc/gentoo-bashcomp-20090613/ChangeLog.bz2 /usr/share/doc/gentoo-bashcomp-20090613/TODO.bz2 /usr/share/doc/gentoo-bashcomp-20090613/AUTHORS.bz2 /usr/share/bash-completion/layman /usr/share/bash-completion/gentoo /usr/share/bash-completion/repoman %% So, please elaborate.
You are absolutely right. It's app-shells/bash-completion which provides this functionality to eselect. I "emerge -C gentoo-bashcomp" and bash completion was still there. But as soon as I ran "emerge --depclean -a" bash-completion vanished and reloading my bash prompt meant no more fancy bash completion.
Specifically, bash-completion provides /etc/profile.d/bash-completion.sh which is what eselect relies upon for bash completion to work, afaict.
eselect is modeled after bash-completion.eclass (which it cannot use since the eclass has eselect itself in RDEPEND). bash-completion.eclass also doesn't depend on app-shells/bash-completion for some reason unknown to me. @darkside: Can you answer this? I also propose to change the eclass to do something like: if [[ ${CATEGORY}/${PN} != app-admin/eselect ]]; then RDEPEND="bash-completion? ( app-admin/eselect )" fi so that eselect could make use of it.
(In reply to comment #4) > eselect is modeled after bash-completion.eclass (which it cannot use since the > eclass has eselect itself in RDEPEND). > > bash-completion.eclass also doesn't depend on app-shells/bash-completion for > some reason unknown to me. historical. Not sure. Maybe eselect can PDEPEND on "bash-completion? ( app-shells/bash-completion )" ?? > > @darkside: Can you answer this? > > I also propose to change the eclass to do something like: > if [[ ${CATEGORY}/${PN} != app-admin/eselect ]]; then > RDEPEND="bash-completion? ( app-admin/eselect )" > fi > so that eselect could make use of it. > That would allow for less code duplication in app-admin/eselect, I can't see any reason to not commit it. Please add a comment that makes sense too.
(In reply to comment #5) > That would allow for less code duplication in app-admin/eselect, I can't see > any reason to not commit it. Please add a comment that makes sense too. Done. I'll convert the eselect ebuild to use the eclass then. > historical. Not sure. Maybe eselect can PDEPEND on > "bash-completion? ( app-shells/bash-completion )" ?? I suggest to put this PDEPEND into the eclass, too. (In fact, it doesn't make any practical difference if the bash-completion dependency is in the eclass or in the eselect ebuild: Since the eclass RDEPENDs on eselect, all packages inheriting bash-completion.eclass will pull in app-shells/bash-completion.)
(In reply to comment #6) > I suggest to put this PDEPEND into the eclass, too. Done, as discussed on IRC. Jacob, thank you for reporting this issue.
Jus' doin' my job.
you fail, sh doesn't have bash-completion keyworded!!
(In reply to comment #9) > you fail, sh doesn't have bash-completion keyworded!! > It is a dev profile. Make it so, if you care.
sh done
Adding arch teams to CC. Please keyword app-shells/bash-completion or use.mask bash-completion in your profile. Target keywords: ~m68k ~sparc-fbsd ~x86-fbsd
m68k done, as requested by armin76.
bsd done
All done.