]> git.saurik.com Git - apt.git/commitdiff
* improve the timeout handling (again)
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 22 Aug 2005 22:27:56 +0000 (22:27 +0000)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 22 Aug 2005 22:27:56 +0000 (22:27 +0000)
apt-pkg/acquire-item.cc
debian/changelog
methods/connect.cc

index 14acad85a39e28987d69e572cbf230a3973d9acf..c39d3fddec1601ecde5dcd0fcb017fca81ccc52c 100644 (file)
@@ -401,7 +401,8 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
    unlink(Final.c_str());
 
    // if we get a timeout if fail
-   if(LookupTag(Message,"FailReason") == "Timeout") {
+   if(LookupTag(Message,"FailReason") == "Timeout" || 
+      LookupTag(Message,"FailReason") == "TmpResolveFailure") {
       Item::Failed(Message,Cnf);
       return;
    }
index 6e76483778120326079c63cb3e2c10e21627bf0e..39ab07b32ef69b59c2d02e7df63c1e9e99637181 100644 (file)
@@ -17,8 +17,13 @@ apt (0.6.40.2) unstable; urgency=low
   * Andreas Pakulat:
     - added example apt-ftparchive.conf file to doc/examples 
       (closes: #322483)
+  * methods/connect.cc:
+    - send failure reason for EAI_AGAIN (TmpResolveFailure) to acuire-item
+  * apt-pkg/acquire-item.cc:
+    - fail early if a FailReason is TmpResolveFailure (avoids hangs during
+      the install when no network is available)
   
- -- 
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 23 Aug 2005 00:15:00 +0200
 
 apt (0.6.40.1) unstable; urgency=low
 
index b85df68874a8524b83610e31db743725eb43196f..4e48927edf65fe3ac7d371875b0de6c031ed994d 100644 (file)
@@ -166,8 +166,11 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd,
            }
            
            if (Res == EAI_AGAIN)
+           {
+              Owner->SetFailExtraMsg("\nFailReason: TmpResolveFailure");
               return _error->Error(_("Temporary failure resolving '%s'"),
                                    Host.c_str());
+           }
            return _error->Error(_("Something wicked happened resolving '%s:%s' (%i)"),
                                 Host.c_str(),ServStr,Res);
         }