summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/acquire-item.cc3
-rw-r--r--debian/changelog7
-rw-r--r--methods/connect.cc3
3 files changed, 11 insertions, 2 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 14acad85a..c39d3fdde 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -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;
}
diff --git a/debian/changelog b/debian/changelog
index 6e7648377..39ab07b32 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/methods/connect.cc b/methods/connect.cc
index b85df6887..4e48927ed 100644
--- a/methods/connect.cc
+++ b/methods/connect.cc
@@ -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);
}