Explorar el Código

reduce the buffer size so we get a sort of realtime progress report
and print the time of output at the front of the progress report
so we can see the delay

David Kalnischkies hace 15 años
padre
commit
288a76d2dc
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      apt-pkg/edsp.cc

+ 2 - 1
apt-pkg/edsp.cc

@@ -233,7 +233,7 @@ bool EDSP::ReadResponse(int const input, pkgDepCache &Cache) {
 
 
 	FileFd in;
 	FileFd in;
 	in.OpenDescriptor(input, FileFd::ReadOnly);
 	in.OpenDescriptor(input, FileFd::ReadOnly);
-	pkgTagFile response(&in);
+	pkgTagFile response(&in, 100);
 	pkgTagSection section;
 	pkgTagSection section;
 
 
 	while (response.Step(section) == true) {
 	while (response.Step(section) == true) {
@@ -243,6 +243,7 @@ bool EDSP::ReadResponse(int const input, pkgDepCache &Cache) {
 		else if (section.Exists("Remove") == true)
 		else if (section.Exists("Remove") == true)
 			type = "Remove";
 			type = "Remove";
 		else if (section.Exists("Progress") == true) {
 		else if (section.Exists("Progress") == true) {
+			std::clog << TimeRFC1123(time(NULL)) << " ";
 			ioprintf(std::clog, "[ %3d%% ] ", section.FindI("Percentage", 0));
 			ioprintf(std::clog, "[ %3d%% ] ", section.FindI("Percentage", 0));
 			std::clog << section.FindS("Progress") << " - ";
 			std::clog << section.FindS("Progress") << " - ";
 			string const msg = section.FindS("Message");
 			string const msg = section.FindS("Message");