provide better info for allready installed capabilities. (bnc #384412).
authorJosef Reidinger <jreidinger@suse.cz>
Tue, 29 Apr 2008 07:51:10 +0000 (07:51 +0000)
committerJosef Reidinger <jreidinger@suse.cz>
Tue, 29 Apr 2008 07:51:10 +0000 (07:51 +0000)
src/zypper-misc.cc

index 781f750..666629b 100644 (file)
@@ -543,15 +543,24 @@ void install_remove(Zypper & zypper,
 
     // is the provider already installed?
     bool installed = false;
+    string provider;
     for_(solvit, q.poolItemBegin(), q.poolItemEnd())
+    {
       if (solvit->status().isInstalled())
-      { installed = true; break; }
+      { 
+        installed = true; 
+        provider = solvit->resolvable()->name();
+        break; 
+      }
+    }
     // already installed, nothing to do
     if (installed && install_not_remove)
     {
-      // translators: meaning a package %s or provider of capability %s
-      zypper.out().info(str::form(_("'%s' is already installed."), str.c_str()));
-      MIL << str::form("skipping '%s': already installed", str.c_str()) << endl;
+      // translators: meaning a package %s providing capability %s
+      string s = boost::str(format(_("'%s' providing '%s' is already installed."))
+        % provider % str.c_str());
+      zypper.out().info(s);
+      MIL << s << endl;
       continue;
     }
     // not installed, nothing to do