- don't display target resolvables in search when --repo is used
authorJan Kupec <jkupec@suse.cz>
Mon, 13 Aug 2007 07:12:39 +0000 (07:12 +0000)
committerJan Kupec <jkupec@suse.cz>
Mon, 13 Aug 2007 07:12:39 +0000 (07:12 +0000)
src/zypper-search.h

index 9343857..3f578ad 100644 (file)
@@ -18,6 +18,7 @@
 #include <zypp/base/Hash.h>
 
 #include "zypper.h"
+#include "zypper-getopt.h"
 #include "zypper-tabulator.h"
 
 extern Settings gSettings;
@@ -322,7 +323,9 @@ struct DuplicateFilter {
   DuplicateFilter(IdCache & idcache) : _idcache(&idcache) {}
 
   bool operator()(const zypp::PoolItem & pi) const {
-    return !(pi.status().isInstalled() && _idcache->contains(pi));
+    //! \todo filter out those language resolvables
+    return !(pi.status().isInstalled()
+        && (_idcache->contains(pi) || copts.count("repo")));
   }
 };