<?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>26532</bug_id>
          
          <creation_ts>2003-08-13 02:43 0000</creation_ts>
          <short_desc>esearch - Replacement for &apos;emerge search&apos; with search-index</short_desc>
          <delta_ts>2003-09-19 06:25:51 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://david-peter.de/esearch</bug_file_loc>
          
          
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>davidpeter@web.de</reporter>
          <assigned_to>dev-portage@gentoo.org</assigned_to>
          <cc>davidpeter@web.de</cc>
    
    <cc>karltk@gentoo.org</cc>
    
    <cc>seemant@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>davidpeter@web.de</who>
            <bug_when>2003-08-13 02:43:11 0000</bug_when>
            <thetext>esearch is a small python script to search the portage tree. The package
includes &apos;eupdatedb&apos;, which will generate an index-file with package-names,
descriptions, homepage etc. After the index is compiled, you can search with
&apos;esearch&apos;. It behaves exactly like &apos;emerge search&apos;.

David</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>davidpeter@web.de</who>
            <bug_when>2003-08-13 02:44:59 0000</bug_when>
            <thetext>Created an attachment (id=16027)
esearch-0.3.0.ebuild
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>aldarsior@yahoo.com</who>
            <bug_when>2003-08-13 03:02:20 0000</bug_when>
            <thetext>This not only works for me, it&apos;s also increadible-- 
time emerge -s moz
real    0m1.736s
user    0m1.524s
sys     0m0.112s

time esearch moz
real    0m0.135s
user    0m0.121s
sys     0m0.009s


time emerge -S browser
real    0m39.918s
user    0m26.439s
sys     0m1.840s

time esearch -S browser
real    0m0.150s
user    0m0.135s
sys     0m0.005s


I think this should replace emerge -s and emerge -S
it takes a while to compile the index
but DAMN its fast :-)
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2003-08-13 15:51:36 0000</bug_when>
            <thetext>rather than doing this i think we should just work on moving all of portage over 
to a compiled db format (Bug 20330) </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>davidpeter@web.de</who>
            <bug_when>2003-08-14 07:52:15 0000</bug_when>
            <thetext>I think esearch could, at least, provide a temporary solution. I don&apos;t think that the portage db will move to a compiled format very soon, although there are even some implementations (http://portagesql.breakmygentoo.net/).
Or are there already some plans to change the format of the portdb?
Furthermore, esearch has some additional functionality (the --compact switch) and maybe I&apos;ll add some more in the next versions.

But anyway, if the portage devs are planning to move the portdb to a &quot;real&quot; db, it makes no sense to add esearch to the portage-tree.

Thanks,

David</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nakano@gentoo.org</who>
            <bug_when>2003-08-14 08:25:28 0000</bug_when>
            <thetext>There is one implement for using db in bug 26447
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>carpaski@gentoo.org</who>
            <bug_when>2003-08-15 17:26:20 0000</bug_when>
            <thetext>Karl take a look at this for gentoolkit? Looks interesting.
Portage will be using dbm eventually, but this looks like a
good &quot;now&quot; solution.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>seemant@gentoo.org</who>
            <bug_when>2003-09-16 15:34:02 0000</bug_when>
            <thetext>David, I love this esearch thing.  The only brokenness I&apos;ve discovered is: 

esearch mysql++

doesn&apos;t exit cleanly because I guess it assumes it to be a regex or something.

Also -- eupdatedb takes a long long time -- any way to speed that up?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>davidpeter@web.de</who>
            <bug_when>2003-09-17 11:04:30 0000</bug_when>
            <thetext>Thanks for your comments. I&apos;ve fixed this &quot;bug&quot; with mysql++. I say &quot;bug&quot;, because it isn&apos;t really a wrong behaviour, but it&apos;s a wrong regex. In fact, emerge -s fixes this regex and adds a slash: ++ -&gt; \+\+.

I&apos;ve done some profiling and found out some functions, that are really slow. I&apos;ll try to work on eupdatedb, to improve speed.

You may try out version 0.3.1. Just copy the esearch-0.3.0.ebuild to esearch-0.3.1.ebuild, and &quot;emerge esearch&quot;.

I would be really happy if it would be added to portage, or to gentoolkit.

PS: eupdate *is* slow compared to other search-scripts (like fastsearch for example), but it has the advantage, that it uses the data directly from portage(.py) so you can be sure, it shows you the right version, description and homepage (e.g. fastsearch cannot evaluate eclasses)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>seemant@gentoo.org</who>
            <bug_when>2003-09-19 00:55:59 0000</bug_when>
            <thetext>I added this to portage, the 0.4.0 version is great.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>davidpeter@web.de</who>
            <bug_when>2003-09-19 03:03:32 0000</bug_when>
            <thetext>Hi,

Thanks a lot, Seemant.

But I&apos;ve got a - maybe stupid - question: Where did my announce of esearch-0.4.0 go? The new ebuild is also missing. However, it seems as if you had the chance to read it, before it disappeared :-)

David</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2003-09-19 05:26:07 0000</bug_when>
            <thetext>------- Additional Comments From shark@phpwelt.com  2003-18-09 07:43 EST -------
Hi,

After a bit of experimenting today, I found out a weak point in eupdatedb. The little mistake I made, was to write the whole package database into the memory, and then write all at once to the index-file. Now I changed the code and it writes the packages directly into the file. This behaviour does not only save free memory, but it really speeds eupdatedb up alot. Now it runs about 10 times faster on my computer.

I also added a ChangeLog and 2 other features. I&apos;ll attach the new ebuild esearch-0.4.0.ebuild.

Thanks for your interest.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>davidpeter@web.de</who>
            <bug_when>2003-09-19 06:25:51 0000</bug_when>
            <thetext>Created an attachment (id=17974)
esearch-0.4.0.ebuild
</thetext>
          </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>16027</attachid>
            <date>2003-08-13 02:44 0000</date>
            <desc>esearch-0.3.0.ebuild</desc>
            <filename>esearch-0.3.0.ebuild</filename>
            <type>text/plain</type>
            <data encoding="base64">IyBDb3B5cmlnaHQgMTk5OS0yMDAzIEdlbnRvbyBUZWNobm9sb2dpZXMsIEluYy4KIyBEaXN0cmli
dXRlZCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIHYy
CiMgJEhlYWRlcjogJAoKREVTQ1JJUFRJT049IlJlcGxhY2VtZW50IGZvciAnZW1lcmdlIHNlYXJj
aCcgd2l0aCBzZWFyY2gtaW5kZXgiClNSQ19VUkk9Imh0dHA6Ly93d3cuZGF2aWQtcGV0ZXIuZGUv
ZXNlYXJjaC8ke1B9LnRhci5iejIiCkhPTUVQQUdFPSJodHRwOi8vd3d3LmRhdmlkLXBldGVyLmRl
L2VzZWFyY2gvIgoKTElDRU5TRT0iR1BMLTIiCgpTTE9UPSIwIgpLRVlXT1JEUz0ifng4NiB+cHBj
IgoKSVVTRT0iIgpERVBFTkQ9Ij49ZGV2LWxhbmcvcHl0aG9uLTIuMiIKCnNyY191bnBhY2soKSB7
Cgl1bnBhY2sgJHtQfS50YXIuYnoyCn0KCnNyY19pbnN0YWxsKCkgewoJZXhlaW50byAvdXNyL2xp
Yi9lc2VhcmNoCglkb2V4ZSBldXBkYXRlZGIucHkgZXNlYXJjaC5weQoKCWRvZGlyIC91c3IvYmlu
LwoJZG9kaXIgL3Vzci9zYmluLwoKCWRvc3ltIC91c3IvbGliL2VzZWFyY2gvZXNlYXJjaC5weSAv
dXNyL2Jpbi9lc2VhcmNoCglkb3N5bSAvdXNyL2xpYi9lc2VhcmNoL2V1cGRhdGVkYi5weSAvdXNy
L3NiaW4vZXVwZGF0ZWRiCn0KCg==
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>17974</attachid>
            <date>2003-09-19 06:25 0000</date>
            <desc>esearch-0.4.0.ebuild</desc>
            <filename>esearch-0.4.0.ebuild</filename>
            <type>text/plain</type>
            <data encoding="base64">IyBDb3B5cmlnaHQgMTk5OS0yMDAzIEdlbnRvbyBUZWNobm9sb2dpZXMsIEluYy4KIyBEaXN0cmli
dXRlZCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIHYy
CiMgJEhlYWRlcjogJAoKREVTQ1JJUFRJT049IlJlcGxhY2VtZW50IGZvciAnZW1lcmdlIHNlYXJj
aCcgd2l0aCBzZWFyY2gtaW5kZXgiClNSQ19VUkk9Imh0dHA6Ly93d3cuZGF2aWQtcGV0ZXIuZGUv
ZXNlYXJjaC8ke1B9LnRhci5iejIiCkhPTUVQQUdFPSJodHRwOi8vd3d3LmRhdmlkLXBldGVyLmRl
L2VzZWFyY2gvIgoKTElDRU5TRT0iR1BMLTIiCgpTTE9UPSIwIgpLRVlXT1JEUz0ifng4NiB+cHBj
IgoKSVVTRT0iIgpERVBFTkQ9Ij49ZGV2LWxhbmcvcHl0aG9uLTIuMiIKCnNyY19pbnN0YWxsKCkg
ewoJZXhlaW50byAvdXNyL2xpYi9lc2VhcmNoCglkb2V4ZSBldXBkYXRlZGIucHkgZXNlYXJjaC5w
eQoKCWRvZGlyIC91c3IvYmluLwoJZG9kaXIgL3Vzci9zYmluLwoKCWRvc3ltIC91c3IvbGliL2Vz
ZWFyY2gvZXNlYXJjaC5weSAvdXNyL2Jpbi9lc2VhcmNoCglkb3N5bSAvdXNyL2xpYi9lc2VhcmNo
L2V1cGRhdGVkYi5weSAvdXNyL3NiaW4vZXVwZGF0ZWRiCgoJZG9kb2MgQ2hhbmdlTG9nCn0KCg==
</data>        

          </attachment>
    </bug>

</bugzilla>