The following commit has been merged in the master branch:
commit 40ceeb668831e537d385e17f2581d89cb939d914
Author: Guillem Jover <[email protected]>
Date:   Tue Dec 23 17:15:25 2008 +0200

    libdpkg: Do not log repeated data when the write call wrote partially

diff --git a/ChangeLog b/ChangeLog
index c035c59..53c64df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-12-23  Guillem Jover  <[email protected]>
+
+       * lib/log.c (statusfd_send): Pass to write the remaining data, not
+       the same initial buffer.
+
 2008-12-08  Raphael Hertzog  <[email protected]>
 
        * scripts/Dpkg/Changelog.pm, scripts/dpkg-buildpackage.pl,
diff --git a/debian/changelog b/debian/changelog
index 9d2f2ae..ceb429b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,7 @@ dpkg (1.15.0) UNRELEASED; urgency=low
   * Unmark dselect debug messages for translation.
   * Use a the warning function to uniformly print all warning messages.
   * Properly use internerr to report about programming bugs.
+  * Do not log repeated strings when the write call wrote partial data.
 
   [ Raphael Hertzog ]
   * Enhance dpkg-shlibdeps's error message when a library can't be found to
diff --git a/lib/log.c b/lib/log.c
index 4a0715e..6852931 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -94,7 +94,7 @@ statusfd_send(const char *fmt, ...)
 
        for (pipef = status_pipes; pipef; pipef = pipef->next) {
                for (p = vb.buf, l = vb.used; l;  p += r, l -= r) {
-                       r = write(pipef->fd, vb.buf, vb.used);
+                       r = write(pipef->fd, p, l);
                        if (r < 0)
                                ohshite(_("unable to write to status fd %d"),
                                        pipef->fd);

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to