]> git.saurik.com Git - apt.git/commitdiff
* methods/connect.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Fri, 8 Feb 2008 11:30:54 +0000 (12:30 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Fri, 8 Feb 2008 11:30:54 +0000 (12:30 +0100)
  - remember hosts with Resolve failures or connect Timeouts
    see https://wiki.ubuntu.com/NetworklessInstallationFixes

1  2 
configure.in
debian/changelog
methods/connect.cc

diff --cc configure.in
index fb9f0fc5cbff9c9b61ffa7d1fc1d35d7c1ce2f08,5f19c98a6f36b3b69d743eabf9009a9c3f2779cd..8dac41bb8d058b8a32fe1c61df589675c5f05e3c
@@@ -18,7 -18,7 +18,7 @@@ AC_CONFIG_AUX_DIR(buildlib
  AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
  
  dnl -- SET THIS TO THE RELEASE VERSION --
- AC_DEFINE_UNQUOTED(VERSION,"0.7.9ubuntu6")
 -AC_DEFINE_UNQUOTED(VERSION,"0.7.10")
++AC_DEFINE_UNQUOTED(VERSION,"0.7.9ubuntu7")
  PACKAGE="apt"
  AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
  AC_SUBST(PACKAGE)
index d1d3c569737e457b0ccf7eaf9b70a1d934423037,14abe57219917100b4fde7f4fc464418f6d9493d..84f68dbf803e8a737d2244dd5ffe209bcc029987
@@@ -1,5 -1,14 +1,13 @@@
 -apt (0.7.11) UNRELEASED; urgency=low
++apt (0.7.9ubuntu7) hardy; urgency=low
++
++  * methods/connect.cc:
++    - remember hosts with Resolve failures or connect Timeouts
++      see https://wiki.ubuntu.com/NetworklessInstallationFixes
++
++ -- Michael Vogt <michael.vogt@ubuntu.com>  Fri, 08 Feb 2008 11:38:35 +0100
++
 +apt (0.7.9ubuntu6) hardy; urgency=low
  
 -  [ Colin Watson ]
 -  * apt-pkg/algorithms.cc:
 -    - Since APT::Get::List-Cleanup and APT::List-Cleanup both default to
 -      true, the effect of the compatibility code was to require both of them
 -      to be set to false in order to disable list cleanup; this broke the
 -      installer. Instead, disable list cleanup if either of them is set to
 -      false.
 -  
 -  [ Michael Vogt ]
    * cmdline/apt-key:
      - add support for a master-keyring that contains signing keys
        that can be used to sign the archive signing keys. This should
index 145001fb37c2aa637cfaecca46b944a0acc2b001,355bd5c4d2253f3d88f8346a614ba3622958b032..c5d57a99fc881084cc9acfe407cd11dd0233491f
  #include <stdio.h>
  #include <errno.h>
  #include <unistd.h>
 +#include <sstream>
  
+ #include<set>
+ #include<string>
  // Internet stuff
  #include <netinet/in.h>
  #include <sys/socket.h>
@@@ -64,6 -69,10 +70,10 @@@ static bool DoConnect(struct addrinfo *
               NI_NUMERICHOST|NI_NUMERICSERV);
     Owner->Status(_("Connecting to %s (%s)"),Host.c_str(),Name);
  
 -   if(bad_addr.find(string(Name)) != bad_addr.end()) 
+    // if that addr did timeout before, we do not try it again
++   if(bad_addr.find(string(Name)) != bad_addr.end())
+       return false;
     /* If this is an IP rotation store the IP we are using.. If something goes
        wrong this will get tacked onto the end of the error message */
     if (LastHostAddr->ai_next != 0)
@@@ -88,7 -99,8 +98,8 @@@
     /* This implements a timeout for connect by opening the connection
        nonblocking */
     if (WaitFd(Fd,true,TimeOut) == false) {
 -      Owner->SetFailExtraMsg("\nFailReason: Timeout");
+       bad_addr.insert(bad_addr.begin(), string(Name));
 +      Owner->SetFailReason("Timeout");
        return _error->Error(_("Could not connect to %s:%s (%s), "
                           "connection timed out"),Host.c_str(),Service,Name);
     }
@@@ -163,7 -179,8 +178,8 @@@ bool Connect(string Host,int Port,cons
                  DefPort = 0;
                  continue;
               }
 -             Owner->SetFailExtraMsg("\nFailReason: ResolveFailure");
+              bad_addr.insert(bad_addr.begin(), Host);
 +             Owner->SetFailReason("ResolveFailure");
               return _error->Error(_("Could not resolve '%s'"),Host.c_str());
            }