Mailinglist Archive: zypp-commit (325 mails)

< Previous Next >
[zypp-commit] r7179 - /trunk/zypper/src/zypper-misc.cc
  • From: jkupec@xxxxxxxxxxxxxxxx
  • Date: Tue, 11 Sep 2007 11:03:36 -0000
  • Message-id: <20070911110336.C99752AFF0@xxxxxxxxxxxxxxxx>
Author: jkupec
Date: Tue Sep 11 13:03:36 2007
New Revision: 7179

URL: http://svn.opensuse.org/viewcvs/zypp?rev=7179&view=rev
Log:
- don't display the number of problems if only one found (#304283)

Modified:
    trunk/zypper/src/zypper-misc.cc

Modified: trunk/zypper/src/zypper-misc.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.cc?rev=7179&r1=7178&r2=7179&view=diff
==============================================================================
--- trunk/zypper/src/zypper-misc.cc (original)
+++ trunk/zypper/src/zypper-misc.cc Tue Sep 11 13:03:36 2007
@@ -488,13 +488,17 @@
     e = rproblems.end (),
     i;
   ProblemSolutionList todo;
-  if (!rproblems.empty()) {
+
+  // display the number of problems
+  if (rproblems.size() > 1) { 
     stm << format (_("%s Problems:")) % rproblems.size() << endl;
   }
-  else {
+  else if (rproblems.empty()) {
+    // should not happen! If solve() failed at least one problem must be set!
     stm << _("Specified capability not found") << endl;
     return false;
   }
+
   // for many problems, list them shortly first
   if (rproblems.size() > 1) 
   {

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages