equery is having trouble locating some of the modules it is trying to import. The module that it is looking for is gentoolkit.package, which exists in /usr/lib64/gentoolkit/pym. I've added that path to the PYTHONPATH, but to no effect; I'm not a Python developer, so that's all I've tried. I've re-installed gentoolkit, env-updated after the re-install, and rebooted since re-installing. I also re-installed python and then re-installed (again) gentoolkit, and done an env-update and source /etc/profile afterwards. I haven't rebooted since I re-installed Python. Reproducible: Always Steps to Reproduce: 1. Call 'equery belongs <file>' 2. 3. Actual Results: 26 % equery belongs /usr/lib/libltdl.so.3 Traceback (most recent call last): File "/usr/bin/equery", line 27, in ? import gentoolkit File "/usr/lib/gentoolkit/pym/gentoolkit/__init__.py", line 37, in ? from helpers import * File "/usr/lib/gentoolkit/pym/gentoolkit/helpers.py", line 12, in ? from gentoolkit.package import * ImportError: No module named package Expected Results: Told me which package <file> belongs to. Or, at least not crashed :-) 27 % ls -l /usr/lib64/gentoolkit/pym/gentoolkit/package.py -rw-r--r-- 1 root root 5382 Aug 20 01:56 /usr/lib64/gentoolkit/pym/gentoolkit/package.py Relevant, yet unhelpful for this problem, forum descussions: http://forums.gentoo.org/viewtopic-t-328867-highlight-equery+module+named.html http://forums.gentoo.org/viewtopic-t-371912-highlight-equery+module+named.html
emerge --info
ender qu # emerge --info Portage 2.0.51.22-r2 (default-linux/amd64/2004.3, gcc-3.4.4, glibc-2.3.5-r1, 2.6.12-gentoo-r7 x86_64) ================================================================= System uname: 2.6.12-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3400+ Gentoo Base System version 1.12.0_pre6 distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.3.5, 2.4.1-r1 sys-apps/sandbox: 1.2.11 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.4.3-r3, 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="no" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=k8 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" LINGUAS="en_GB eo" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 16bit 3dnowex X X509 acpi4linux alsa arts artswrappersuid avi berkdb bluetooth bzip2 bzlib cairo cdda cddb cdio cdparanoia cdr cdrom codecs crypt css cups curl dbi dbm directfb dnd doc dvd dvdr dvdread ecc eds emul-linux encode esd exif expat faad fam fame fb fbcon fbdev ffmpeg fftw flac flash foomaticdb fortran fpx freetype gd gdbm ggi gif gimp gimpprint glitz glut gphoto2 gpm graphviz gs gsm gstreamer gtk2 hal http httpd iconv image imagekits imagemagick imap imlib imlib2 immqt-bc ipv6 irda irmc jabber java javascript jpeg jpeg2k kcal kde kdeenablefinal kdepim koffice-plugin lcd lcms ldap lesstif libwww lirc lm_sensors logitech-mouse lufsusermount lzo lzw lzw-tiff m17n-lib mad mcal md5sum mew mhash mime mimencode ming mixer mjpeg mng mozsvg mp3 mpeg mpeg4 mpi mplayer multilib nas ncurses net network nls ocaml offensive ogg oggvorbis opengl openssh pam passfile pcmcia pda pdf pdfkit pdflib perl plotutils png posix povray python qt quicktime rdesktop readline real recode rss ruby sasl scanner sdl simplexml slang smime sms snmp sockets speex spell sqlite sqlite3 ssl stream svg svgz tcpd theora threads thumbnail tidy tiff timidity transcode truetype-fonts trusted type1 type1-fonts ucs2 unicode uptimed usb userlocales utf8 uudeview v4l v4l2 vcd vcdimager vim vim-pager vim-with-x vlm vnc vorbis wifi wma123 wmf xanim xface xine xml xml2 xmlrpc xmms xpm xprint xscreensaver xsl xslt xv xvid xvmc zlib zvbi linguas_en_GB linguas_eo userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, MAKEOPTS
Sean, could it be that you still have a gentoolkit.py from 0.2.0 in /usr/lib64/gentoolkit/pym/gentoolkit? If so, that would explain your problem: just remove the file, it doesn't exists anymore in 0.2.1_preX. That said, i think it's still a gentoolkit bug (although it would be a minor one). Fix for helpers.py would be: -from gentoolkit.package import * +from package import * The point is that hardcoding a package name for intra-package imports is bad since it only creates ambiguities like the one above (and redundancy which makes it harder to rename a package). I think that's why an "import foo" from modules of the package "bar" will always look for the "foo" module in the "bar" package first, prior to searching the import path.
I have been upgrading and downgrading gentoolkit since this bug was opened and have been unable to duplicate. However, I have fixed the imports for helpers.py.
TGL -- I may have had an old gentoolkit.py. I've done a bunch of cleaning and upgrading since I reported this bug, and it seems to have gone away. I don't currently have a gentoolkit.py file, FWIW. Thanks for looking at this. --- SER