]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/acquire-worker.cc:
authorYOSHINO Yoshihito <yy.y.ja.jp@gmail.com>
Mon, 7 May 2012 19:16:25 +0000 (21:16 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Mon, 7 May 2012 19:16:25 +0000 (21:16 +0200)
  - revert the use of FileFd::Write in OutFdReady as we don't want error
    reports about EAGAIN here as we retry later. Thanks to YOSHINO Yoshihito
    for the report. (Closes: #671721)

apt-pkg/acquire-worker.cc
debian/changelog

index 8bc043c582bf855f393afc78d797546987cb92ad..d6db8bc02c7d565935f985513fef03db4a0f8d00 100644 (file)
@@ -511,10 +511,17 @@ bool pkgAcquire::Worker::QueueItem(pkgAcquire::Queue::QItem *Item)
 /* */
 bool pkgAcquire::Worker::OutFdReady()
 {
-   if (FileFd::Write(OutFd,OutQueue.c_str(),OutQueue.length()) == false)
+   int Res;
+   do
+   {
+      Res = write(OutFd,OutQueue.c_str(),OutQueue.length());
+   }
+   while (Res < 0 && errno == EINTR);
+
+   if (Res <= 0)
       return MethodFailure();
-   
-   OutQueue.clear();
+
+   OutQueue.erase(0,Res);
    if (OutQueue.empty() == true)
       OutReady = false;
    
index 8eec902d0eaf0bf25987036c9e3a33c4ab1fd6ad..ad3f5c8949fe3540eed44de96907618d286d4312 100644 (file)
@@ -34,8 +34,12 @@ apt (0.9.3) unstable; urgency=low
   * apt-pkg/deb/deblistparser.cc:
     - check length and containing chars for a given description md5sum
   * ensure that apti18n.h is included last as advertised (Closes: #671623)
+  * apt-pkg/acquire-worker.cc:
+    - revert the use of FileFd::Write in OutFdReady as we don't want error
+      reports about EAGAIN here as we retry later. Thanks to YOSHINO Yoshihito
+      for the report. (Closes: #671721)
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Sat, 05 May 2012 15:35:16 +0200
+ -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 07 May 2012 21:12:23 +0200
 
 apt (0.9.2) unstable; urgency=low