]> git.saurik.com Git - apt.git/blobdiff - apt-inst/extract.cc
centralize unlink checks in acquire-item
[apt.git] / apt-inst / extract.cc
index 60edc702e37a385f1a97ece8879804d2ba6dca5b..026182c186ab5181f8dee410a85f8685abbf2da4 100644 (file)
 #include <apt-pkg/error.h>
 #include <apt-pkg/debversion.h>
 #include <apt-pkg/fileutl.h>
+#include <apt-pkg/dirstream.h>
+#include <apt-pkg/filelist.h>
+#include <apt-pkg/mmap.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
 
+#include <string.h>
+#include <string>
 #include <sys/stat.h>
 #include <stdio.h>
-#include <unistd.h>
 #include <errno.h>
 #include <dirent.h>
 #include <iostream>
+
 #include <apti18n.h>
                                                                        /*}}}*/
 using namespace std;
@@ -253,7 +260,7 @@ bool pkgExtract::DoItem(Item &Itm, int &/*Fd*/)
 // Extract::Finished - Sequence finished, erase the temp files         /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-bool pkgExtract::Finished()
+APT_CONST bool pkgExtract::Finished()
 {
    return true;
 }
@@ -397,7 +404,7 @@ bool pkgExtract::HandleOverwrites(pkgFLCache::NodeIterator Nde,
       // Now see if this package matches one in a replace depends
       pkgCache::DepIterator Dep = Ver.DependsList();
       bool Ok = false;
-      for (; Dep.end() == false; Dep++)
+      for (; Dep.end() == false; ++Dep)
       {
         if (Dep->Type != pkgCache::Dep::Replaces)
            continue;