diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-02 22:47:49 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-02 22:47:49 +0200 |
commit | 661f7b1c727aada703ffbb350d44759189a441fe (patch) | |
tree | 1cf63ac5f8722413e62e59fbd5d48606f49446fa /methods/mirror.cc | |
parent | 0ded3ad3438666f833773895ef6318f84d2f849d (diff) |
methods/mirror.cc: remove Acquire::Mirror::RefreshInterval (not really useful)
Diffstat (limited to 'methods/mirror.cc')
-rw-r--r-- | methods/mirror.cc | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/methods/mirror.cc b/methods/mirror.cc index b9fa55d87..4d767c9f3 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -128,28 +128,6 @@ bool MirrorMethod::DownloadMirrorFile(string mirror_uri_str) if(Debug) clog << "MirrorMethod::DownloadMirrorFile(): " << endl; - // check the file, if it is not older than RefreshInterval just use it - // otherwise try to get a new one - if(FileExists(MirrorFile)) - { - struct stat buf; - time_t t,now,refresh; - if(stat(MirrorFile.c_str(), &buf) != 0) - return false; - t = std::max(buf.st_mtime, buf.st_ctime); - now = time(NULL); - refresh = 60*_config->FindI("Acquire::Mirror::RefreshInterval",360); - if(t + refresh > now) - { - if(Debug) - clog << "Mirror file is in RefreshInterval" << endl; - DownloadedMirrorFile = true; - return true; - } - if(Debug) - clog << "Mirror file " << MirrorFile << " older than " << refresh << "min, re-download it" << endl; - } - // not that great to use pkgAcquire here, but we do not have // any other way right now string fetch = BaseUri; |