summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debindexfile.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-02-17 22:40:05 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-02-17 22:40:05 +0100
commit9fcbe2047293f8ef703439264ed3d35701f51638 (patch)
tree5669db5c2fd2caf7274ff751f9e6a22311f09273 /apt-pkg/deb/debindexfile.cc
parent424d785b672f80a0f1a5b6ab4a858c48f4c49bfd (diff)
parent762d7367f5f74f877ec75986e19fc9d46eef5164 (diff)
merged from the mvo branch
Diffstat (limited to 'apt-pkg/deb/debindexfile.cc')
-rw-r--r--apt-pkg/deb/debindexfile.cc30
1 files changed, 30 insertions, 0 deletions
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc
index ed7633803..be8175e31 100644
--- a/apt-pkg/deb/debindexfile.cc
+++ b/apt-pkg/deb/debindexfile.cc
@@ -306,9 +306,19 @@ pkgCache::PkgFileIterator debPackagesIndex::FindInCache(pkgCache &Cache) const
struct stat St;
if (stat(File.FileName(),&St) != 0)
+ {
+ if (_config->FindB("Debug::pkgCacheGen", false))
+ std::clog << "PackagesIndex::FindInCache - stat failed on " << File.FileName() << std::endl;
return pkgCache::PkgFileIterator(Cache);
+ }
if ((unsigned)St.st_size != File->Size || St.st_mtime != File->mtime)
+ {
+ if (_config->FindB("Debug::pkgCacheGen", false))
+ std::clog << "PackagesIndex::FindInCache - size (" << St.st_size << " <> " << File->Size
+ << ") or mtime (" << St.st_mtime << " <> " << File->mtime
+ << ") doesn't match for " << File.FileName() << std::endl;
return pkgCache::PkgFileIterator(Cache);
+ }
return File;
}
@@ -472,9 +482,19 @@ pkgCache::PkgFileIterator debTranslationsIndex::FindInCache(pkgCache &Cache) con
struct stat St;
if (stat(File.FileName(),&St) != 0)
+ {
+ if (_config->FindB("Debug::pkgCacheGen", false))
+ std::clog << "TranslationIndex::FindInCache - stat failed on " << File.FileName() << std::endl;
return pkgCache::PkgFileIterator(Cache);
+ }
if ((unsigned)St.st_size != File->Size || St.st_mtime != File->mtime)
+ {
+ if (_config->FindB("Debug::pkgCacheGen", false))
+ std::clog << "TranslationIndex::FindInCache - size (" << St.st_size << " <> " << File->Size
+ << ") or mtime (" << St.st_mtime << " <> " << File->mtime
+ << ") doesn't match for " << File.FileName() << std::endl;
return pkgCache::PkgFileIterator(Cache);
+ }
return File;
}
return File;
@@ -541,9 +561,19 @@ pkgCache::PkgFileIterator debStatusIndex::FindInCache(pkgCache &Cache) const
struct stat St;
if (stat(File.FileName(),&St) != 0)
+ {
+ if (_config->FindB("Debug::pkgCacheGen", false))
+ std::clog << "StatusIndex::FindInCache - stat failed on " << File.FileName() << std::endl;
return pkgCache::PkgFileIterator(Cache);
+ }
if ((unsigned)St.st_size != File->Size || St.st_mtime != File->mtime)
+ {
+ if (_config->FindB("Debug::pkgCacheGen", false))
+ std::clog << "StatusIndex::FindInCache - size (" << St.st_size << " <> " << File->Size
+ << ") or mtime (" << St.st_mtime << " <> " << File->mtime
+ << ") doesn't match for " << File.FileName() << std::endl;
return pkgCache::PkgFileIterator(Cache);
+ }
return File;
}
return File;