Remove deprecated zypp::Product::type() calls.
authorJán Kupec <jkupec@suse.cz>
Sun, 7 Jun 2009 13:23:25 +0000 (15:23 +0200)
committerJán Kupec <jkupec@suse.cz>
Sun, 7 Jun 2009 13:23:25 +0000 (15:23 +0200)
- Is Base: Yes/No is shown instead
- in rug mode, Category: base/(empty) is shown

src/info.cc
src/search.cc

index a3bccb6..92ff694 100644 (file)
@@ -399,10 +399,14 @@ void printProductInfo(Zypper & zypper, const ui::Selectable & s)
     printNVA(pool_item.resolvable());
 
     Product::constPtr product = asKind<Product>(pool_item.resolvable());
-    cout << _("Category")   << ": " << product->type() << endl;
-    cout << _("Flavor")     << ": " << product->flavor() << endl;
-    cout << _("Installed")  << ": " << (pool_item.status().isInstalled() ? "Yes" : "No") << endl;
-    cout << _("Short Name")       << ": " << product->shortName() << endl;
+    cout << _("Is Base")   << ": "
+      << (product->isTargetDistribution()  ? _("Yes") : _("No")) << endl;
+    cout << _("Flavor")     << ": "
+      << product->flavor() << endl;
+    cout << _("Installed")  << ": "
+      << (pool_item.status().isInstalled() ? _("Yes") : _("No")) << endl;
+    cout << _("Short Name")
+      << ": " << product->shortName() << endl;
     printSummaryDesc(pool_item.resolvable());
   }
 }
index 24a69b2..89649d9 100644 (file)
@@ -538,11 +538,10 @@ static void list_product_table(Zypper & zypper)
   th << _("Name");
   th << _("Version");
   if (zypper.globalOpts().is_rug_compatible)
-     // translators: product category (the rug term)
+     // translators: product category (base/addon), the rug term
      th << _("Category");
   else
-    // translators: product type (addon/base) (rug calls it Category)
-    th << _("Type");
+    th << _("Is Base");
   tbl << th;
 
   bool installed_only = zypper.cOpts().count("installed-only");
@@ -569,7 +568,10 @@ static void list_product_table(Zypper & zypper)
       tr << "";
     }
     tr << product->name () << product->edition().asString();
-    tr << product->type();
+    if (zypper.globalOpts().is_rug_compatible)
+      tr << (product->isTargetDistribution() ? "base" : "");
+    else
+      tr << (product->isTargetDistribution() ? _("Yes") : _("No"));
     tbl << tr;
   }
   tbl.sort(1); // Name