X-Git-Url: https://git.hcoop.net/ntk/apt.git/blobdiff_plain/9abccf4a63b6c887b213678d940fe912233f04c3..655122418d714f342b5d9789f45f8035f3fe8b9a:/apt-pkg/edsp/edspindexfile.cc diff --git a/apt-pkg/edsp/edspindexfile.cc b/apt-pkg/edsp/edspindexfile.cc index f5881e66..80b9f79e 100644 --- a/apt-pkg/edsp/edspindexfile.cc +++ b/apt-pkg/edsp/edspindexfile.cc @@ -6,6 +6,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include + #include #include #include @@ -13,6 +15,7 @@ #include #include #include +#include #include #include @@ -21,7 +24,7 @@ // edspIndex::edspIndex - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -edspIndex::edspIndex(string File) : debStatusIndex(File) +edspIndex::edspIndex(std::string File) : debStatusIndex(File) { } /*}}}*/ @@ -41,17 +44,15 @@ bool edspIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const if (Prog != NULL) Prog->SubProgress(0,File); - if (Gen.SelectFile(File,string(),*this) == false) + if (Gen.SelectFile(File,std::string(),*this) == false) return _error->Error("Problem with SelectFile %s",File.c_str()); // Store the IMS information pkgCache::PkgFileIterator CFile = Gen.GetCurFile(); - struct stat St; - if (fstat(Pkg.Fd(),&St) != 0) - return _error->Errno("fstat","Failed to stat"); - CFile->Size = St.st_size; - CFile->mtime = St.st_mtime; - CFile->Archive = Gen.WriteUniqString("edsp::scenario"); + CFile->Size = Pkg.FileSize(); + CFile->mtime = Pkg.ModificationTime(); + map_ptrloc const storage = Gen.WriteUniqString("edsp::scenario"); + CFile->Archive = storage; if (Gen.MergeList(Parser) == false) return _error->Error("Problem with MergeList %s",File.c_str()); @@ -62,7 +63,7 @@ bool edspIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const class edspIFType: public pkgIndexFile::Type { public: - virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const + virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator) const { // we don't have a record parser for this type as the file is not presistent return NULL;