Hi, starting equery with or without options crashes instantly and prints out: xxx:~>equery Traceback (most recent call last): File "/usr/bin/equery", line 27, in ? import gentoolkit ImportError: No module named gentoolkit Reproducible: Always Steps to Reproduce: 1.equery [enter] 2. 3. Actual Results: xxx:~>equery Traceback (most recent call last): File "/usr/bin/equery", line 27, in ? import gentoolkit ImportError: No module named gentoolkit Expected Results: it should work ;-) root:/home/xxx>emerge info Portage 2.0.51.20-r4 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.5-r0, 2.6.11-gentoo-r6 i686) ================================================================= System uname: 2.6.11-gentoo-r6 i686 AMD Athlon(tm) XP 2400+ Gentoo Base System version 1.6.11 ccache version 2.4 [enabled] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r8 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.6.11 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -Os -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib/X11/xkb /usr/share/config /usr/share/cursors/xorg-x11/default/" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /usr/share/cursors/xorg-x11/default/index.theme /usr/share/scite/SciTEGlobal.properties /etc/env.d" CXXFLAGS="-march=athlon-xp -Os -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache cvs digest distlocks nodoc noinfo sandbox sfperms strict" GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo/ http://mirror.switch.ch/mirror/gentoo/ http://ftp.du.se/pub/os/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.lug.ro/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/ http://gentoo.ITDNet.net/gentoo http://ftp.easynet.nl/mirror/gentoo/" LANG="de_DE@euro" LC_ALL="de_DE@euro" LDFLAGS="-Wl,-O1 -Wl,--sort-common" LINGUAS="de" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dfx 3dnow X amd apm avi bitmap-fonts cdparanoia cdr cdrom cups divx4linux dvd dvdr encode extensions f77 flac foomaticdb fortran gcj gif gimp gimpprint gtk gtk2 imagemagick imlib java jpeg libwww linguas_de mixer mmap mmx motif mozilla moznocompose moznoirc moznomail moznoxft mp3 mpeg multislot ncurses nls nomac nptl nvidia oggvorbis opengl oss pdf pdflib perl pic png ppds print python qt readline samba sdl sse ssl stencil-buffer svga tcltk tcpd tetex tiff truetype truetype-fonts unicode usb userlocales x86 xine xv zlib" Unset: ASFLAGS, CTARGET
oh dang, i forgot the version: app-portage/gentoolkit-0.2.1_pre1 forgive me my noobishness ;(
Different error message but equery is not working: ~ $ equery Traceback (most recent call last): File "/usr/bin/equery", line 31, in ? import gentoolkit.pprinter as pp ImportError: No module named pprinter
It looks like there was a problem at one time with portage not cleaning out *.pyc files in /usr/lib/gentoolkit/pym I had a very old /usr/lib/gentoolkit/pym/gentoolkit.pyc from way back when until just now, so equery was using it instead of the missing one that should have been one directory lower. Chris you might want to unmerge gentoolkit and make sure there are no files left in /usr/lib/gentoolkit/pym before emerging a working version again.
>Chris you might want to unmerge gentoolkit and make sure there are no files left in /usr/lib/gentoolkit/pym before emerging a working version again. Did that and now I get the same error as the reporter: ~ # equery Traceback (most recent call last): File "/usr/bin/equery", line 27, in ? import gentoolkit ImportError: No module named gentoolkit Also only one file in /usr/lib/gentookit/pym: ~ # ls /usr/lib/gentoolkit/pym glsa.py
Unmerge/clean/remerge does not help at all... # equery belongs equery Traceback (most recent call last): File "/usr/bin/equery", line 31, in ? import gentoolkit.pprinter as pp ImportError: No module named pprinter
Created attachment 57221 [details, diff] Patch for Makefile in gentoolkit-0.2.1_pre1/src/gentookit I can verify this bug. The problem is the following: The file errors.py is missing from the gentoolkit-0.2.1_pre1/src/gentoolkit/ directory in the tarball. The Makefile in the same directory needs to be updated to install all of the python modules. Additionally, there are some other errors that I am still working out. If you need equery to work prior to this being fixed, then I would recommend downgrading to gentoolkit-0.2.0
> Did that and now I get the same error as the reporter: Right, I wasn't suggesting it as a fix, its just good to get rid of the stale file that was left around from some previous version. Thats why some of us had different error messages.
Created attachment 57237 [details] Missing errors.py file from local copy of gentoolkit CVS
Created attachment 57238 [details, diff] Patch to fix equery The problem as far as I can tell was in the conversion of loading the gentoolkit API as module to importing it as a package. Here are the steps that I used to fix it: Note: where I say /path/to substitute the path where you saved the attachments. $ emerge unmerge gentoolkit $ cd /var/tmp/portage $ rm -rf gentoolkit-0.2.1_pre1 $ env FEATURES="keepwork" emerge -v gentoolkit $ cd /var/tmp/portage/gentoolkit-0.2.1_pre1/work/gentoolkit-0.2.1_pre1/src/gentoolkit/ $ cp /path/to/errors.py . $ patch < /path/to/gentoolkit.patch $ cd $ ebuild /usr/portage/app-portage/gentoolkit/gentoolkit-0.2.1_pre1.ebuild install $ ebuild /usr/portage/app-portage/gentoolkit/gentoolkit-0.2.1_pre1.ebuild qmerge
should be fixed in pre2
I'm having a somewhat similar error with gentoolkit-0.2.1-pre2. I wasn't sure if I should open a new bug or what, so I'm reopening this one. aw ~ # equery 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 aw ~ # Downgrading gentoolkit to 0.2.0 fixes it.
Does /usr/lib/gentoolkit/pym/package.py exist?
No, this is it: aw pym # ls -lR .: total 52 drwxr-xr-x 2 root root 272 Apr 30 20:17 gentoolkit -rw-r--r-- 1 root root 21260 Apr 30 20:16 glsa.py -rw-r--r-- 1 root root 25308 Mar 5 15:36 glsa.pyc ./gentoolkit: total 60 -rw-r--r-- 1 root root 24 Apr 30 20:16 __init__.py -rw-r--r-- 1 root root 159 Apr 30 20:17 __init__.pyc -rw-r--r-- 1 root root 9598 Apr 30 20:16 gentoolkit.py -rw-r--r-- 1 root root 16975 Apr 30 20:17 gentoolkit.pyc -rw-r--r-- 1 root root 6677 Apr 30 11:04 helpers.pyc -rw-r--r-- 1 root root 1625 Apr 30 20:16 pprinter.py -rw-r--r-- 1 root root 5403 Apr 30 20:17 pprinter.pyc
Nevermind, somehow re-emerging it again fixes it. I think I turned off AUTOCLEAN in make.conf and it may have broken stuff.