diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:51:04 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:51:04 +0000 |
commit | 0118833a3b3e65ad7296863aa7d49574eb615f83 (patch) | |
tree | bbeac95408b7a84a983cc602dae3b315ed9976d9 /apt-pkg/pkgcachegen.cc | |
parent | 7b0229fe01e9b300e1a67d82f7a6511c31444756 (diff) |
Devel acquire module
Author: jgg
Date: 1998-10-15 06:59:59 GMT
Devel acquire module
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r-- | apt-pkg/pkgcachegen.cc | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 567628ef5..7227f15eb 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcachegen.cc,v 1.18 1998/10/02 04:39:47 jgg Exp $ +// $Id: pkgcachegen.cc,v 1.19 1998/10/15 07:00:00 jgg Exp $ /* ###################################################################### Package Cache Generator - Generator for the cache structure. @@ -487,10 +487,31 @@ bool pkgPkgCacheCheck(string CacheFile) return false; } + // Status files that must be in the cache + string Status[3]; + Status[0] = _config->FindDir("Dir::State::xstatus"); + Status[1]= _config->FindDir("Dir::State::userstatus"); + Status[2] = _config->FindDir("Dir::State::status"); + // Cheack each file for (pkgCache::PkgFileIterator F(Cache); F.end() == false; F++) + { if (F.IsOk() == false) return false; + + // See if this is one of the status files + for (int I = 0; I != 3; I++) + if (F.FileName() == Status[I]) + Status[I] = string(); + } + + // Make sure all the status files are loaded. + for (int I = 0; I != 3; I++) + { + if (Status[I].empty() == false && FileExists(Status[I]) == true) + return false; + } + return true; } /*}}}*/ |