* Write records from "apt-cache show" using fwrite(3) r...
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 17:02:38 +0000 (17:02 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 17:02:38 +0000 (17:02 +0000)
Author: mdz
Date: 2003-08-02 19:53:23 GMT
* Write records from "apt-cache show" using fwrite(3) rather than
write(2), in case for some reason the entire record doesn't get
written by a single write(2)

cmdline/apt-cache.cc
debian/changelog

index bcf4e1c..046d6f7 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: apt-cache.cc,v 1.66 2003/08/01 20:27:13 mdz Exp $
+// $Id: apt-cache.cc,v 1.67 2003/08/02 19:53:23 mdz Exp $
 /* ######################################################################
    
    apt-cache - Manages the cache files
@@ -1195,7 +1195,7 @@ bool DisplayRecord(pkgCache::VerIterator V)
    Buffer[V.FileList()->Size] = '\n';
    if (PkgF.Seek(V.FileList()->Offset) == false ||
        PkgF.Read(Buffer,V.FileList()->Size) == false ||
-       write(STDOUT_FILENO,Buffer,V.FileList()->Size+1) != V.FileList()->Size+1)
+       fwrite(Buffer,1,V.FileList()->Size+1,stdout) < V.FileList()->Size+1)
    {
       delete [] Buffer;
       return false;
index 04b2f04..c413fb7 100644 (file)
@@ -7,8 +7,11 @@ apt (0.5.9) unstable; urgency=low
   * Patch from Otavio Salvador to switch from dh_installmanpages to
     dh_installman.  Fixes the problem where the pt_BR man page was
     installed in the wrong location (Closes: #194558)
+  * Write records from "apt-cache show" using fwrite(3) rather than
+    write(2), in case for some reason the entire record doesn't get
+    written by a single write(2)
 
- -- Matt Zimmerman <mdz@debian.org>  Sat,  2 Aug 2003 15:50:02 -0400
+ --
 
 apt (0.5.8) unstable; urgency=medium