- /*}}}*/
-// PackagesIndex::Merge - Load the index file into a cache /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-bool debPackagesIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const
-{
- string const PackageFile = IndexFileName();
- FileFd Pkg(PackageFile,FileFd::ReadOnly, FileFd::Extension);
- debListParser Parser(&Pkg, Target.Option(IndexTarget::ARCHITECTURE));
-
- if (_error->PendingError() == true)
- return _error->Error("Problem opening %s",PackageFile.c_str());
- if (Prog != NULL)
- Prog->SubProgress(0, Target.Description);
-
-
- std::string const URI = Target.Option(IndexTarget::REPO_URI);
- std::string Dist = Target.Option(IndexTarget::RELEASE);
- if (Dist.empty())
- Dist = "/";
- ::URI Tmp(URI);
- if (Gen.SelectFile(PackageFile, *this, Target.Option(IndexTarget::ARCHITECTURE), Target.Option(IndexTarget::COMPONENT)) == false)
- return _error->Error("Problem with SelectFile %s",PackageFile.c_str());
-
- // Store the IMS information
- pkgCache::PkgFileIterator File = Gen.GetCurFile();
- pkgCacheGenerator::Dynamic<pkgCache::PkgFileIterator> DynFile(File);
- File->Size = Pkg.FileSize();
- File->mtime = Pkg.ModificationTime();
-
- if (Gen.MergeList(Parser) == false)
- return _error->Error("Problem with MergeList %s",PackageFile.c_str());
-
- return true;
-}
- /*}}}*/
-// PackagesIndex::FindInCache - Find this index /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-pkgCache::PkgFileIterator debPackagesIndex::FindInCache(pkgCache &Cache) const