X-Git-Url: http://git.hcoop.net/ntk/apt.git/blobdiff_plain/5bf15716398fdb767ca6249a0155219b88d7ae60..5dd4c8b811d9c7bc33e50254811f5bc0fc37f872:/apt-pkg/clean.cc diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc index 0d1dfbf7..629afd7c 100644 --- a/apt-pkg/clean.cc +++ b/apt-pkg/clean.cc @@ -12,6 +12,7 @@ #include #include #include +#include #include @@ -26,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) @@ -75,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