<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>106278</bug_id>
          
          <creation_ts>2005-09-17 07:38 0000</creation_ts>
          <short_desc>app-portage/gentoolkit - equery search misses 3/4 of installed packages</short_desc>
          <delta_ts>2008-02-21 01:51:33 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Portage Development</product>
          <component>Tools</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <keywords>InSVN</keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>170220</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>remi@gentoo.org</reporter>
          <assigned_to>tools-portage@gentoo.org</assigned_to>
          <cc>esigra@gmail.com</cc>

      

      
          <long_desc isprivate="0">
            <who>remi@gentoo.org</who>
            <bug_when>2005-09-17 07:38:01 0000</bug_when>
            <thetext>Here are two outputs from equery and the deprecated qpkg

atmos linux # qpkg -I gtk
app-text/gtkspell *
dev-cpp/gtkmm *
dev-python/pygtk *
gnome-extra/libgtkhtml *
x11-libs/gtk+ *
x11-libs/gtkglarea *
x11-libs/gtksourceview *
x11-libs/wxGTK *
x11-themes/gtk-engines *

atmos linux # equery list gtk
[ Searching for package &apos;gtk&apos; in all categories among: ]
 * installed packages
[I--] [  ] x11-themes/gtk-engines-2.6.5 (2)


On a side note the &quot;-I&quot; flag described in the man page doesn&apos;t work :

atmos linux # equery list -I gtk+
!!! You must specify one of -i, -p or -o


I was under the impression that equery was reliable ... am I missing something?

Reproducible: Always
Steps to Reproduce:
1. equery list gtk
2. see missing packages




Portage 2.0.51.22-r2 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r1,
2.6.12-gentoo-r10 i686)
=================================================================
System uname: 2.6.12-gentoo-r10 i686 Intel(R) Pentium(R) M processor 1.70GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5-r2
sys-apps/sandbox:    1.2.12
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.6
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS=&quot;x86&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;i686-pc-linux-gnu&quot;
CFLAGS=&quot;-Os -march=pentium3 -fomit-frame-pointer -pipe -mmmx -msse&quot;
CHOST=&quot;i686-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /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&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-Os -march=pentium3 -fomit-frame-pointer -pipe -mmmx -msse&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig distlocks sandbox sfperms strict&quot;
GENTOO_MIRRORS=&quot;http://adelie.polymtl.ca/&quot;
LANG=&quot;fr_FR.UTF-8&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/portage&quot;
SYNC=&quot;rsync://rsync.ca.gentoo.org/gentoo-portage&quot;
USE=&quot;x86 X a52 acpi alsa avi berkdb bitmap-fonts cdparanoia cdr crypt cups dbus
dga directfb dts dvd dvdr dvdread eds emboss encode evo exif ffmpeg foomaticdb
fortran gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 hal howl imlib jpeg
libg++ libwww mad mikmod mmx motif mozilla mp3 mpeg ncurses nls nptl nptlonly
ogg oggvorbis opengl pam pda pdflib perl png ppds python quicktime readline real
sdl spell sse ssl svg tcpd theora tiff truetype truetype-fonts type1-fonts
unicode userlocales vorbis win32codecs wxwindows xml2 xv xvid zlib userland_GNU
kernel_linux elibc_glibc&quot;
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2005-09-17 08:55:55 0000</bug_when>
            <thetext>equery list searches for exactly gtk, rather than anything containing gtk. The
fact that gtk-engines shows up is a bug caused by the fact that equery in this
case treats it as package gtk with version engines-2.6.5. To find all packages
containing gtk, the less friendly equery list &apos;.*gtk.*&apos; can be used. (Also, in
equery, the search is case sensitive, so this won&apos;t find wxGTK, which contains
GTK rather than gtk.) Yes, it&apos;s true that this is not very intuitive.

&gt; On a side note the &quot;-I&quot; flag described in the man page doesn&apos;t work :
&gt; atmos linux # equery list -I gtk+
&gt; !!! You must specify one of -i, -p or -o

From the manpage: &quot;if -I is used, -p and/or -o must be also&quot; Also, bug #77113
may be of interest.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>remi@gentoo.org</who>
            <bug_when>2005-09-17 16:38:24 0000</bug_when>
            <thetext>oh ok, I reread the man page again and it didn&apos;t specify that searching meant
using grep type regexp, and I figured it would work like qpkg. Maybe the man
page on this aspect could be made clearer.

For the -I switch maybe the error message could say &quot;You must _also_ specify one
of -i, -p or -o&quot; or maybe imply the &quot;-p&quot; switch automagically if no other switch
is specified.

Thanks for taking the time to answer, if you feel like my ideas aren&apos;t worth
much, feel free to close this bug as it&apos;s turned more into a feature request.

R</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>remi@gentoo.org</who>
            <bug_when>2005-09-17 16:38:24 0000</bug_when>
            <thetext>oh ok, I reread the man page again and it didn&apos;t specify that searching meant
using grep type regexp, and I figured it would work like qpkg. Maybe the man
page on this aspect could be made clearer.

For the -I switch maybe the error message could say &quot;You must _also_ specify one
of -i, -p or -o&quot; or maybe imply the &quot;-p&quot; switch automagically if no other switch
is specified.

Thanks for taking the time to answer, if you feel like my ideas aren&apos;t worth
much, feel free to close this bug as it&apos;s turned more into a feature request.

Rémi</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fuzzyray@gentoo.org</who>
            <bug_when>2005-11-11 12:23:54 0000</bug_when>
            <thetext>I&apos;m still thinking about this one. If I do anything it will be to automatically
add -p if -I is used by itself.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>michael@smith-li.com</who>
            <bug_when>2008-02-18 22:23:20 0000</bug_when>
            <thetext>Created an attachment (id=143910)
equery_default_package_finder.diff

This patch causes equery to always use a default package finder. In other words:

(test) black equery # equery list -I portage # OLD
!!! You must specify one of -i, -p or -o
(test) black equery # ./equery list -I portage # NEW
!!! With -I you must specify one of -i, -p or -o. Assuming -p
[ Searching for package &apos;portage&apos; in all categories among: ]
 * Portage tree (/usr/portage)
[-P-] [  ] app-portage/portage-manpages-20060913 (0)
[-P-] [M~] app-portage/portage-mod_jabber-0.0.2 (0)
[-P-] [M~] app-portage/portage-mod_jabber-0.0.3 (0)
[-P-] [M~] app-portage/portage-utils-0.1.29 (0)
[-P-] [M~] dev-python/yolk-portage-0.1 (0)
[-P-] [  ] sys-apps/portage-2.0.51.22-r3 (0)
[-P-] [  ] sys-apps/portage-2.1.1-r2 (0)
[-P-] [  ] sys-apps/portage-2.1.2.12 (0)
[-P-] [  ] sys-apps/portage-2.1.3.19 (0)
[-P-] [M~] sys-apps/portage-2.2_pre2 (0)
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fuzzyray@gentoo.org</who>
            <bug_when>2008-02-18 23:44:23 0000</bug_when>
            <thetext>$ svn commit -m &quot;Assume the -p flag when equery list -I is used by itself. (Bug 106278)&quot;
Sending        equery/equery
Transmitting file data .
Committed revision 469.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fuzzyray@gentoo.org</who>
            <bug_when>2008-02-21 01:51:33 0000</bug_when>
            <thetext>Released in gentoolkit-0.2.4_rc2</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>143910</attachid>
            <date>2008-02-18 22:23 0000</date>
            <desc>equery_default_package_finder.diff</desc>
            <filename>equery.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">SW5kZXg6IGVxdWVyeQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBlcXVlcnkJKHJldmlzaW9uIDQ2OCkKKysrIGVx
dWVyeQkod29ya2luZyBjb3B5KQpAQCAtMTI4NCw2ICsxMjg0LDggQEAKIAkJCWVsaWYgeCBpbiBb
Ii1pIiwgIi0taW5zdGFsbGVkIl06CiAJCQkJb3B0c1siaW5jbHVkZUluc3RhbGxlZCJdID0gMQog
CQkJZWxpZiB4IGluIFsiLUkiLCAiLS1leGNsdWRlLWluc3RhbGxlZCJdOgorCQkJCSMgSWYgLUkg
aXMgdGhlIG9ubHkgb3B0aW9uLCB3YXJuCisJCQkJIyAod2FybmluZyBsb2NhdGVkIGluIHBlcmZv
cm0oKSkKIAkJCQlvcHRzWyJpbmNsdWRlSW5zdGFsbGVkIl0gPSAwCiAJCQllbGlmIHggaW4gWyIt
cCIsICItLXBvcnRhZ2UtdHJlZSJdOgogCQkJCW9wdHNbImluY2x1ZGVQb3J0VHJlZSJdID0gMQpA
QCAtMTMyOCwxNiArMTMzMCwxOSBAQAogCiAJCXBhY2thZ2VfZmluZ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