]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/clean.cc
* merge the remaining Ubuntu change:
[apt.git] / apt-pkg / clean.cc
index 0d623d86217f6fb062a545c52dbfeb63cff94c41..629afd7cf2a7849e4b8ff2798a39698e5a0c7019 100644 (file)
@@ -8,14 +8,11 @@
    ##################################################################### */
                                                                        /*}}}*/
 // Includes                                                            /*{{{*/
-#ifdef __GNUG__
-#pragma implementation "apt-pkg/clean.h"
-#endif
-
 #include <apt-pkg/clean.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/configuration.h>
+#include <apt-pkg/aptconfiguration.h>
 
 #include <apti18n.h>    
 
@@ -23,7 +20,6 @@
 #include <sys/stat.h>
 #include <unistd.h>
                                                                        /*}}}*/
-
 // ArchiveCleaner::Go - Perform smart cleanup of the archive           /*{{{*/
 // ---------------------------------------------------------------------
 /* Scan the directory for files to erase, we check the version information
@@ -31,7 +27,6 @@
 bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache)
 {
    bool CleanInstalled = _config->FindB("APT::Clean-Installed",true);
-   string MyArch = _config->Find("APT::Architecture");
       
    DIR *D = opendir(Dir.c_str());
    if (D == 0)
@@ -80,9 +75,9 @@ bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache)
       for (I = Start; *I != 0 && *I != '.' ;I++);
       if (*I != '.')
         continue;
-      string Arch = DeQuoteString(string(Start,I-Start));
+      string const Arch = DeQuoteString(string(Start,I-Start));
       
-      if (Arch != "all" && Arch != MyArch)
+      if (APT::Configuration::checkArchitecture(Arch) == false)
         continue;
       
       // Lookup the package