From c5e2fa2b772524c03b0c7f777ffea6f2485fe6ca Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 11 Apr 2018 12:45:38 +0200 Subject: Deprectate buggy/incorrect Rls/PkgFile::IsOk methods With the advent of compressed files and especially with in-memory post-processed files the simple assumptions made in IsOk are no longer true. Worse, they are at best duplicates of checks performed by the cache generation (and validation) earlier and isn't used in too many places. It is hence best to simply get right of these calls instead of trying to fix them. --- apt-pkg/pkgcache.cc | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'apt-pkg/pkgcache.cc') diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 6b9c645a4..92f0cb777 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -968,13 +968,6 @@ const char * pkgCache::VerIterator::MultiArchType() const included here. */ bool pkgCache::RlsFileIterator::IsOk() { - struct stat Buf; - if (stat(FileName(),&Buf) != 0) - return false; - - if (Buf.st_size != (signed)S->Size || Buf.st_mtime != S->mtime) - return false; - return true; } /*}}}*/ @@ -1002,13 +995,6 @@ string pkgCache::RlsFileIterator::RelStr() included here. */ bool pkgCache::PkgFileIterator::IsOk() { - struct stat Buf; - if (stat(FileName(),&Buf) != 0) - return false; - - if (Buf.st_size != (signed)S->Size || Buf.st_mtime != S->mtime) - return false; - return true; } /*}}}*/ -- cgit v1.2.3