X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/e8afd16892e87a6e2f17c1019ee455f5583387c2..ebc5b43cca0a16e3f552130db9233fa14b313739:/apt-pkg/indexcopy.cc?ds=sidebyside diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index b0f191ded..f9adb2fb8 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -19,10 +19,11 @@ #include #include #include -#include +#include #include #include #include +#include #include #include @@ -476,9 +477,9 @@ bool SourceCopy::RewriteEntry(FileFd &Target, std::string const &File) } /*}}}*/ // SigVerify::Verify - Verify a files md5sum against its metaindex /*{{{*/ -bool SigVerify::Verify(string prefix, string file, indexRecords *MetaIndex) +bool SigVerify::Verify(string prefix, string file, metaIndex *MetaIndex) { - const indexRecords::checkSum *Record = MetaIndex->Lookup(file); + const metaIndex::checkSum *Record = MetaIndex->Lookup(file); bool const Debug = _config->FindB("Debug::aptcdrom",false); // we skip non-existing files in the verifcation of the Release file @@ -545,11 +546,11 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, // Read all Release files for (vector::iterator I = SigList.begin(); I != SigList.end(); ++I) - { + { if(Debug) cout << "Signature verify for: " << *I << endl; - indexRecords *MetaIndex = new indexRecords; + metaIndex *MetaIndex = new debReleaseIndex("",""); string prefix = *I; string const releasegpg = *I+"Release.gpg"; @@ -591,12 +592,13 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, } // Open the Release file and add it to the MetaIndex - if(!MetaIndex->Load(release)) + std::string ErrorText; + if(MetaIndex->Load(release, &ErrorText) == false) { - _error->Error("%s",MetaIndex->ErrorText.c_str()); + _error->Error("%s", ErrorText.c_str()); return false; } - + // go over the Indexfiles and see if they verify // if so, remove them from our copy of the lists vector keys = MetaIndex->MetaKeys(); @@ -769,14 +771,14 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ } /*}}}*/ -IndexCopy::IndexCopy() {} +IndexCopy::IndexCopy() : d(NULL) {} APT_CONST IndexCopy::~IndexCopy() {} -PackageCopy::PackageCopy() : IndexCopy() {} +PackageCopy::PackageCopy() : IndexCopy(), d(NULL) {} APT_CONST PackageCopy::~PackageCopy() {} -SourceCopy::SourceCopy() : IndexCopy() {} +SourceCopy::SourceCopy() : IndexCopy(), d(NULL) {} APT_CONST SourceCopy::~SourceCopy() {} -TranslationsCopy::TranslationsCopy() {} +TranslationsCopy::TranslationsCopy() : d(NULL) {} APT_CONST TranslationsCopy::~TranslationsCopy() {} -SigVerify::SigVerify() {} +SigVerify::SigVerify() : d(NULL) {} APT_CONST SigVerify::~SigVerify() {}