fix cache search output, implement 'byKind' iterator (incomplete)
authorKlaus Kaempf <kkaempf@suse.de>
Fri, 17 Aug 2007 09:45:09 +0000 (09:45 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Fri, 17 Aug 2007 09:45:09 +0000 (09:45 +0000)
src/zypper-search.cc
src/zypper-search.h

index a72958e..5192493 100644 (file)
@@ -82,9 +82,9 @@ ZyppSearch::invokeOnEachSearched(_Filter filter_r, _PoolCallback pool_cb, _Cache
     {
       try
       {
-      // search cache on ALL or UNINSTALLED by TYPE
+        // search cache on ALL or UNINSTALLED by TYPE
 
-      _query.query( "%libzypp%", cache_cb );
+        _query.iterateResolvablesByKind( _options.kind(), cache_cb );
       }
       catch ( const Exception & excpt_r )
       {
@@ -117,7 +117,7 @@ ZyppSearch::invokeOnEachSearched(_Filter filter_r, _PoolCallback pool_cb, _Cache
       {
       // search cache on ALL or UNINSTALLED by EXACT NAME
 
-      _query.queryByName( _qstrings[0], 0, cache_cb );
+        _query.iterateResolvablesByName( _qstrings[0], 0, cache_cb );
       }
       catch ( const Exception & excpt_r )
       {
@@ -144,7 +144,7 @@ ZyppSearch::invokeOnEachSearched(_Filter filter_r, _PoolCallback pool_cb, _Cache
       {
       // search cache on ALL or UNINSTALLED by WILD NAME
 
-      _query.queryByName( _qstrings[0], 3, cache_cb );
+        _query.iterateResolvablesByName( _qstrings[0], 3, cache_cb );
       }
       catch ( const Exception & excpt_r )
       {
index 9d0bd32..ea05101 100644 (file)
@@ -330,7 +330,7 @@ struct FillTable
     // add other fields to the result table
     row << alias
         // TODO what about rug's Bundle?
-        << "kind"              // FIXME: (gSettings.is_rug_compatible ? "" : res->kind().asString()) 
+        << (gSettings.is_rug_compatible ? "" : res->kind.asString())
         << res->name
         << res->edition.asString()
         << res->arch.asString();