summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-08-23 08:20:18 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-08-23 08:20:18 +0000
commitbdcf3b49360a353381e981d1918fc300c559948a (patch)
tree09f334d69228757c90c56d0d644a169c300ee8a1 /apt-pkg
parent64995601ae9335dedd180d634940f1426598f7f0 (diff)
parent25182152bc7812fdd56fd40f8b9a04a140079585 (diff)
* cherry-picked patches from apt--fixes and apt--mvo
Patches applied: * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-14 * added Hashsum support for file and cdrom * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-18 * Change pkgPolicy::Pin from private to protected * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-47 * improve the timeout handling (again)
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc6
-rw-r--r--apt-pkg/policy.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 14acad85a..ef107444f 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;
}
@@ -904,7 +905,8 @@ void pkgAcqArchive::Done(string Message,unsigned long Size,string Md5Hash,
{
Status = StatError;
ErrorText = _("MD5Sum mismatch");
- Rename(DestFile,DestFile + ".FAILED");
+ if(FileExists(DestFile))
+ Rename(DestFile,DestFile + ".FAILED");
return;
}
}
diff --git a/apt-pkg/policy.h b/apt-pkg/policy.h
index 15f204798..40ebd3f70 100644
--- a/apt-pkg/policy.h
+++ b/apt-pkg/policy.h
@@ -45,6 +45,8 @@ using std::vector;
class pkgPolicy : public pkgDepCache::Policy
{
+ protected:
+
struct Pin
{
pkgVersionMatch::MatchType Type;
@@ -58,8 +60,6 @@ class pkgPolicy : public pkgDepCache::Policy
string Pkg;
};
- protected:
-
Pin *Pins;
signed short *PFPriority;
vector<Pin> Defaults;