reduce the buffer size so we get a sort of realtime progress report
authorDavid Kalnischkies <kalnischkies@gmail.com>
Mon, 2 May 2011 10:23:13 +0000 (12:23 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Mon, 2 May 2011 10:23:13 +0000 (12:23 +0200)
and print the time of output at the front of the progress report
so we can see the delay

apt-pkg/edsp.cc

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