]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debindexfile.cc
centralize unlink checks in acquire-item
[apt.git] / apt-pkg / deb / debindexfile.cc
index d3599b35369bf09679e58b4a464c217a5f558f7f..793882e67a6d6d827e091517c4160fbafba49a5a 100644 (file)
@@ -27,6 +27,7 @@
 #include <stdio.h>
 #include <iostream>
 #include <string>
+#include <sstream>
 
 #include <sys/stat.h>
                                                                        /*}}}*/
@@ -144,6 +145,17 @@ uint8_t debStatusIndex::GetIndexFlags() const
 {
    return pkgCache::Flag::NotSource;
 }
+
+pkgCacheListParser * debStatusIndex::CreateListParser(FileFd &Pkg)
+{
+   if (Pkg.IsOpen() == false)
+      return NULL;
+   _error->PushToStack();
+   pkgCacheListParser * const Parser = new debStatusListParser(&Pkg);
+   bool const newError = _error->PendingError();
+   _error->MergeWithStack();
+   return newError ? NULL : Parser;
+}
                                                                        /*}}}*/
 // DebPkgFile Index - a single .deb file as an index                   /*{{{*/
 debDebPkgFileIndex::debDebPkgFileIndex(std::string const &DebFile)
@@ -237,7 +249,14 @@ pkgCache::PkgFileIterator debDebPkgFileIndex::FindInCache(pkgCache &Cache) const
 
    return File;
 }
-
+std::string debDebPkgFileIndex::ArchiveInfo_impl(pkgCache::VerIterator const &Ver) const
+{
+   std::string Res = IndexFileName() + " ";
+   Res.append(Ver.ParentPkg().Name()).append(" ");
+   Res.append(Ver.Arch()).append(" ");
+   Res.append(Ver.VerStr());
+   return Res;
+}
                                                                        /*}}}*/
 // DscFile Index - a single .dsc file as an index                      /*{{{*/
 debDscFileIndex::debDscFileIndex(std::string const &DscFile)