Display all "Parsing patch..." on one line.
authorMartin Vidner <mvidner@suse.cz>
Thu, 2 Nov 2006 16:28:07 +0000 (16:28 +0000)
committerMartin Vidner <mvidner@suse.cz>
Thu, 2 Nov 2006 16:28:07 +0000 (16:28 +0000)
package/zypper.changes
src/zmart-source-callbacks.h

index 31eb906..7a4ad84 100644 (file)
@@ -1,7 +1,8 @@
 -------------------------------------------------------------------
-Thu Nov  2 14:41:02 CET 2006 - mvidner@suse.cz
+Thu Nov  2 17:26:25 CET 2006 - mvidner@suse.cz
 
 - Do not parse metadata of disabled sources *blush* (#217297).
+- Display all "Parsing patch..." on one line.
 
 -------------------------------------------------------------------
 Wed Nov  1 19:54:55 CET 2006 - mvidner@suse.cz
index e8f545c..ace7891 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <stdlib.h>
 #include <iostream>
+#include <boost/algorithm/string.hpp>
 
 #include <zypp/base/Logger.h>
 #include <zypp/ZYppCallbacks.h>
@@ -228,10 +229,14 @@ struct SourceReportReceiver  : public zypp::callback::ReceiveReport<zypp::source
     return (Action) read_action_ari ();
   }
 
-  virtual void finish( zypp::Source_Ref /*source*/, const std::string &/*task*/, Error error, const std::string &reason )
+  virtual void finish( zypp::Source_Ref /*source*/, const std::string &task, Error error, const std::string &reason )
   {
     display_step(100);
-    display_done ();
+    // many of these, avoid newline
+    if (boost::algorithm::starts_with (task, "Parsing patch"))
+      cerr_v << '\r' << flush;
+    else
+      display_done ();
     display_error (error, reason);
   }