Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134053 - equery which command causes traceback with non-existent ebuilds
Summary: equery which command causes traceback with non-existent ebuilds
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 170220
  Show dependency tree
 
Reported: 2006-05-22 13:14 UTC by Vincent Reher
Modified: 2007-04-11 05:03 UTC (History)
1 user (show)

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


Attachments
equery with debug print statements (equery,47.69 KB, text/plain)
2006-05-22 14:45 UTC, Paul Varner (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Reher 2006-05-22 13:14:11 UTC
# Before:
# Gentoolkit version: app-portage/gentoolkit-0.2.0-r2
# Portage snapshot is about 6 months old

# equery --version

equery(0.1.3) - Gentoo Package Query Tool
Author(s): Karl Trygve Kalleberg

# equery -c which xxx # no such package anywhere
!!! No masked or unmasked packages found for xxx

# equery -c which pmidi # installed but not in portage
!!! No masked or unmasked packages found for pmidi

# --------------------------------------------------------

# After:
# Gentoolkit version: app-portage/gentoolkit-0.2.1
# Portage snapshot: 4/20/2006:

# equery --version
equery(0.1.4) - Gentoo Package Query Tool
Author(s): Karl Trygve Kalleberg

# equery -c which xxx # no such package anywhere
!!! No masked or unmasked packages found for xxx

# equery -c which pmidi # installed but no longer in portage
Traceback (most recent call last):
  File "/usr/bin/equery", line 1641, in ?
    cmd.perform(local_opts)
  File "/usr/bin/equery", line 941, in perform
    print_info(0, os.path.normpath(matches[-1].get_ebuild_path()))
  File "/usr/lib/python2.4/posixpath.py", line 378, in normpath
    initial_slashes = path.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'

# emerge --info

Portage 2.0.54-r2 (default-linux/x86/2006.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.13-gentoo-r3 i686)
=================================================================
System uname: 2.6.13-gentoo-r3 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz
Gentoo Base System version 1.6.14
ccache version 2.3 [disabled]
dev-lang/python:     2.3.4, 2.4.2
dev-python/pycrypto: [Not Present]
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
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-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -fomit-frame-pointer"
CHOST="i686-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/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=i686 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distlocks sandbox sfperms strict userpriv"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/distro/portage-local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aalib acl adns alsa apache2 apm arts audiofile avi berkdb bitmap-fonts bonobo bzip2 cdr cli crypt cscope cups curl directfb doc dri dts eds emboss encode esd ethereal exif expat fam ffmpeg firebird flac foomaticdb fortran freetds gd gdbm ggi gif glut gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal hardened howl idn imagemagick imlib ipv6 isdnlog jack java jpeg kde lcms ldap libcaca libedit libg++ libwww lirc lua mad mikmod mng motif mozilla mp3 mpeg mysql nas ncurses nls nptl odbc ogg openal opengl oss pam pcre pdflib perl png postgres pppd python qt quicktime readline reflection ruby samba scanner sdl session slang snmp speex spell spl sqlite ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb vorbis wmf xine xml xml2 xmms xorg xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS
Comment 1 Paul Varner (RETIRED) gentoo-dev 2006-05-22 14:45:10 UTC
Created attachment 87282 [details]
equery with debug print statements

Please run the attached equery and reply back with the output
Comment 2 Vincent Reher 2006-05-30 06:05:44 UTC
As requested, here is the output of the debug version of equery:

# ./my-equery.py -c which pmidi

[<gentoolkit.package.Package instance at 0xb7365aac>]
media-sound/pmidi-1.6.0
None
Traceback (most recent call last):
  File "./my-equery.py", line 1644, in ?
    cmd.perform(local_opts)
  File "./my-equery.py", line 944, in perform
    print_info(0, os.path.normpath(matches[-1].get_ebuild_path()))
  File "/usr/lib/python2.4/posixpath.py", line 378, in normpath
    initial_slashes = path.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'
Comment 3 Paul Varner (RETIRED) gentoo-dev 2006-06-05 12:36:26 UTC
Thanks, the traceback is caused by the fact that an ebuild no longer exists for the installed package. I will work on getting this fixed in the 0.2.3 release of gentoolkit.
Comment 4 Vincent Reher 2006-06-11 08:19:06 UTC
(In reply to comment #3)
Very good.  FWIW: if the code is literally looking for the ebuild file itself, it still exists in /var/db/pkg/...
Comment 5 Paul Varner (RETIRED) gentoo-dev 2007-03-09 04:22:59 UTC
I was unable to get this included in gentoolkit-0.2.3. I will work on it for gentoolkit-0.2.4
Comment 6 Paul Varner (RETIRED) gentoo-dev 2007-03-31 23:05:44 UTC
$ svn commit -m " Fix traceback in equery which (Bug #134053)" src/equery/equery ChangeLog
Sending        ChangeLog
Sending        src/equery/equery
Transmitting file data ..
Committed revision 369.
Comment 7 Paul Varner (RETIRED) gentoo-dev 2007-04-11 05:03:51 UTC
Released in gentoolkit-0.2.4_pre4