From 8fb83c32ee54ff4e625ac91dd315b35f488c6990 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A1n=20Kupec?= Date: Mon, 26 Apr 2010 13:44:47 +0200 Subject: [PATCH] Show support level in package info (bnc #599154) --- src/info.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/info.cc b/src/info.cc index 2100bf6..7166bc4 100644 --- a/src/info.cc +++ b/src/info.cc @@ -11,6 +11,7 @@ #include "zypp/ZYpp.h" #include "zypp/base/Algorithm.h" +#include "zypp/Package.h" #include "zypp/Patch.h" #include "zypp/Pattern.h" #include "zypp/Product.h" @@ -173,6 +174,7 @@ void printPkgInfo(Zypper & zypper, const ui::Selectable & s) PoolItem theone = s.updateCandidateObj(); if (!theone) theone = installed; + Package::constPtr pkg = asKind(theone.resolvable()); cout << (zypper.globalOpts().is_rug_compatible ? _("Catalog: ") : _("Repository: ")) << (zypper.config().show_alias ? @@ -181,6 +183,11 @@ void printPkgInfo(Zypper & zypper, const ui::Selectable & s) printNVA(theone.resolvable()); + // if running on SUSE Linux Enterprise, report unsupported packages + Product::constPtr platform = God->target()->baseProduct(); + if (platform && platform->name().find("SUSE_SLE") != string::npos) + cout << _("Support Level: ") << asUserString(pkg->vendorSupport()) << endl; + cout << _("Installed: ") << (installed ? _("Yes") : _("No")) << endl; //! \todo fix this - arch? -- 2.7.4