X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b2e465d6d32d2dc884f58b94acb7e35f671a87fe..23c5897cbdb5a957788201a5178e963586dcdbc9:/apt-pkg/clean.cc diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc index 0d623d862..629afd7cf 100644 --- a/apt-pkg/clean.cc +++ b/apt-pkg/clean.cc @@ -8,14 +8,11 @@ ##################################################################### */ /*}}}*/ // Includes /*{{{*/ -#ifdef __GNUG__ -#pragma implementation "apt-pkg/clean.h" -#endif - #include #include #include #include +#include #include @@ -23,7 +20,6 @@ #include #include /*}}}*/ - // 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