fixed bug #224673
authorJan Kupec <jkupec@suse.cz>
Fri, 1 Dec 2006 15:30:58 +0000 (15:30 +0000)
committerJan Kupec <jkupec@suse.cz>
Fri, 1 Dec 2006 15:30:58 +0000 (15:30 +0000)
further, thanx to fix of #223750 there's no further need to
zypp->removeResolvables(tgt_resolvables) in ZyppSearch::cacheInstalled()
and no need to compare arch and edition of cached target resolvables with the source ones to find out whether a resolvable is installed in FillTable.

src/zypper-search.cc
src/zypper-search.h

index 5a3796f..ce19e0c 100644 (file)
@@ -110,8 +110,6 @@ void ZyppSearch::cacheInstalled() {
   invokeOnEachSearched(Match(_reg,_options.searchDescriptions()),
     functorRef<bool,const zypp::PoolItem &>(_icache));
 
-  _zypp->removeResolvables(tgt_resolvables);
-
   cout_v << _icache.size() << " out of (" <<  tgt_resolvables.size() << ")"  
     "cached." << endl;
 }
index 2788627..e4e8863 100644 (file)
@@ -102,7 +102,7 @@ public:
   bool includeKindInKey() { return _incl_kind_in_key; }
 
   std::string getKey(const zypp::PoolItem & pi) const {
-    return pi.resolvable()->name() + pi.resolvable()->edition().asString() +
+    return pi.resolvable()->name() +
       (_incl_kind_in_key ? pi.resolvable()->kind().asString() : "");
   }
 
@@ -215,8 +215,7 @@ struct FillTable
     zypp::PoolItem inst_item = _icache->getItem(pool_item);
     if (inst_item) {
       // check whether the pool item is installed...
-      if (inst_item.resolvable()->edition() == pool_item.resolvable()->edition() &&
-          inst_item.resolvable()->arch() == pool_item.resolvable()->arch())
+      if (pool_item.status().isInstalled())
         row << "i";
       // ... or there's just another version of it installed
       else