]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debindexfile.cc
dpkgpm: Use ptsname_r() instead of ptsname() to be thread-safe
[apt.git] / apt-pkg / deb / debindexfile.cc
index 627cd36c5327dc35b0f9465e83974834e512bd50..32ccd75291fe212503d114e04958a3ef3d5f678a 100644 (file)
 #include <apt-pkg/deblistparser.h>
 #include <apt-pkg/debrecords.h>
 #include <apt-pkg/configuration.h>
-#include <apt-pkg/progress.h>
 #include <apt-pkg/error.h>
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/acquire-item.h>
-#include <apt-pkg/debmetaindex.h>
-#include <apt-pkg/gpgv.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/indexfile.h>
-#include <apt-pkg/mmap.h>
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/cacheiterators.h>
-#include <apt-pkg/pkgcachegen.h>
 #include <apt-pkg/pkgrecords.h>
 #include <apt-pkg/srcrecords.h>
-#include <apt-pkg/sptr.h>
 
 #include <stdio.h>
 #include <iostream>
-#include <sstream>
 #include <string>
-#include <memory>
+#include <sstream>
+
 #include <sys/stat.h>
                                                                        /*}}}*/
 
@@ -153,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)