- honor --{un}installed-only in 'products'
authorJan Kupec <jkupec@suse.cz>
Thu, 17 Apr 2008 13:08:43 +0000 (13:08 +0000)
committerJan Kupec <jkupec@suse.cz>
Thu, 17 Apr 2008 13:08:43 +0000 (13:08 +0000)
src/zypper-search.cc

index 816c816..dce16e6 100644 (file)
@@ -232,7 +232,18 @@ void list_products(Zypper & zypper)
     Product::constPtr product = asKind<Product>(it->resolvable());
 
     TableRow tr;
-    tr << (it->isSatisfied() ? "i" : ""); 
+    if (it->isSatisfied())
+    {
+      if (notinst_only)
+        continue;
+      tr << "i";
+    }
+    else
+    {
+      if (installed_only)
+        continue;
+      tr << "";
+    }
     tr << product->name () << product->edition().asString();
     tr << product->type();
     tbl << tr;