]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cdrom.cc
appease adequate with some weak symbols for -private
[apt.git] / apt-pkg / cdrom.cc
index 76c450618a8a6cb7565c22f2829cce47b8fcd8f4..29eeca066a21e0120df49660a713efbb7a9d2421 100644 (file)
@@ -24,6 +24,7 @@
 #include <dlfcn.h>
 #include <iostream>
 #include <sstream>
+#include <fstream>
 
 #include<apti18n.h>
 
@@ -155,10 +156,7 @@ bool pkgCdrom::FindPackages(string CD,
       // Skip some files..
       if (strcmp(Dir->d_name,".") == 0 ||
          strcmp(Dir->d_name,"..") == 0 ||
-         //strcmp(Dir->d_name,"source") == 0 ||
          strcmp(Dir->d_name,".disk") == 0 ||
-         strcmp(Dir->d_name,"experimental") == 0 ||
-         strcmp(Dir->d_name,"binary-all") == 0 ||
           strcmp(Dir->d_name,"debian-installer") == 0)
         continue;
 
@@ -428,8 +426,8 @@ bool pkgCdrom::WriteDatabase(Configuration &Cnf)
 {
    string DFile = _config->FindFile("Dir::State::cdroms");
    string NewFile = DFile + ".new";
-   
-   unlink(NewFile.c_str());
+
+   RemoveFile("WriteDatabase", NewFile);
    ofstream Out(NewFile.c_str());
    if (!Out)
       return _error->Errno("ofstream::ofstream",
@@ -470,7 +468,7 @@ bool pkgCdrom::WriteSourceList(string Name,vector<string> &List,bool Source)
       return _error->Errno("ifstream::ifstream","Opening %s",File.c_str());
 
    string NewFile = File + ".new";
-   unlink(NewFile.c_str());
+   RemoveFile("WriteDatabase", NewFile);
    ofstream Out(NewFile.c_str());
    if (!Out)
       return _error->Errno("ofstream::ofstream",