summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-07-07 16:47:09 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-07-07 16:47:09 +0200
commit24baab5c477bf1e57a0b169a7bac1d2e9ab0c974 (patch)
treed6ca9cc91e457a9c4ead4942719f428100eee6f3
parent7273e49443e480d57bd8455f9cf9a0f39ef181f4 (diff)
* apt-pkg/deb/dpkgpm.cc:
- make the apt/term.log output unbuffered (thanks to Matt Zimmerman)
-rw-r--r--apt-pkg/deb/dpkgpm.cc3
-rw-r--r--debian/changelog2
2 files changed, 4 insertions, 1 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 8abe3f5c6..2bbc7a4ba 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -20,6 +20,7 @@
#include <stdlib.h>
#include <fcntl.h>
#include <sys/select.h>
+#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
@@ -582,7 +583,7 @@ bool pkgDPkgPM::OpenLog()
term_out = fopen(logfile_name.c_str(),"a");
if (term_out == NULL)
return _error->WarningE(_("Could not open file '%s'"), logfile_name.c_str());
-
+ setvbuf(term_out, NULL, _IONBF, 0);
chmod(logfile_name.c_str(), 0600);
fprintf(term_out, "\nLog started: %s\n", timestr);
}
diff --git a/debian/changelog b/debian/changelog
index f4cdeeec5..27acd33c5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -47,6 +47,8 @@ apt (0.7.25.4) UNRELEASED; urgency=low
- install html doxygen in libapt-pkg-doc as well
* methods/http.cc:
- code cleanup, add (some) doxygen strings
+ * apt-pkg/deb/dpkgpm.cc:
+ - make the apt/term.log output unbuffered (thanks to Matt Zimmerman)
[ Robert Collins ]
* Change the package index Info methods to allow apt-cache policy to be