Mailinglist Archive: zypp-commit (171 mails)

< Previous Next >
[zypp-commit] <zypper> master : Remove deprecated zypp::Product::type() calls.
  • From: Ján Kupec <jkupec@xxxxxxx>
  • Date: Sun, 7 Jun 2009 15:23:25 +0200
  • Message-id: <E1MDcA5-0007BC-PO@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 2ce0a422ca97ad72e6936ca768e7fc4f5b4a35af
Author: Ján Kupec <jkupec@xxxxxxx>
Date: Sun Jun 7 15:23:25 2009 +0200

Remove deprecated zypp::Product::type() calls.

- Is Base: Yes/No is shown instead
- in rug mode, Category: base/(empty) is shown
---
src/info.cc | 12 ++++++++----
src/search.cc | 10 ++++++----
2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/info.cc b/src/info.cc
index a3bccb6..92ff694 100644
--- a/src/info.cc
+++ b/src/info.cc
@@ -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());
}
}
diff --git a/src/search.cc b/src/search.cc
index 24a69b2..89649d9 100644
--- a/src/search.cc
+++ b/src/search.cc
@@ -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
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages