diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:52:13 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:52:13 +0000 |
commit | b0b4efb96c3fad90bf978d61b230501bcdadff3d (patch) | |
tree | 63c6013b85da3fe3835f1ef37466c91279fa9c47 /apt-pkg/pkgcachegen.cc | |
parent | 30456e14d97be16516a5a84ce9bf9acba143da87 (diff) |
Release support
Author: jgg
Date: 1998-12-14 02:23:46 GMT
Release support
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r-- | apt-pkg/pkgcachegen.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index ccb6bedd4..58561bf35 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.24 1998/12/07 07:26:21 jgg Exp $ +// $Id: pkgcachegen.cc,v 1.25 1998/12/14 02:23:47 jgg Exp $ /* ###################################################################### Package Cache Generator - Generator for the cache structure. @@ -635,8 +635,8 @@ bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress) for (pkgSourceList::const_iterator I = List.begin(); I != List.end(); I++) { string File = ListDir + URItoFileName(I->PackagesURI()); - - if (stat(File.c_str(),&Buf) != 0) + + if (FileExists(File) == false) continue; FileFd Pkg(File,FileFd::ReadOnly); @@ -652,6 +652,16 @@ bool pkgMakeStatusCache(pkgSourceList &List,OpProgress &Progress) if (Gen.MergeList(Parser) == false) return _error->Error("Problem with MergeList %s",File.c_str()); + + // Check the release file + string RFile = ListDir + URItoFileName(I->ReleaseURI()); + if (FileExists(RFile) == true) + { + FileFd Rel(RFile,FileFd::ReadOnly); + if (_error->PendingError() == true) + return false; + Parser.LoadReleaseInfo(Gen.GetCurFile(),Rel); + } } // Write the src cache |