From 65a1e968442361247b646dc61843f841235114e0 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:52:47 +0000 Subject: Minor fixes Author: jgg Date: 1999-02-08 07:30:49 GMT Minor fixes --- cmdline/apt-get.cc | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'cmdline/apt-get.cc') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index e99c832c4..8e5d7356a 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-get.cc,v 1.39 1999/02/07 08:40:34 jgg Exp $ +// $Id: apt-get.cc,v 1.40 1999/02/08 07:30:50 jgg Exp $ /* ###################################################################### apt-get - Cover for dpkg @@ -47,6 +47,7 @@ #include #include #include +#include #include /*}}}*/ @@ -1001,20 +1002,22 @@ bool DoClean(CommandLine &CmdL) // --------------------------------------------------------------------- /* This is similar to clean but it only purges things that cannot be downloaded, that is old versions of cached packages. */ +class LogCleaner : public pkgArchiveCleaner +{ + protected: + virtual void Erase(const char *File,string Pkg,string Ver,struct stat &St) + { + cout << "Del " << Pkg << " " << Ver << " [" << SizeToStr(St.st_size) << "b]" << endl; + }; +}; + bool DoAutoClean(CommandLine &CmdL) { CacheFile Cache; if (Cache.Open(true) == false) return false; - class LogCleaner : public pkgArchiveCleaner - { - protected: - virtual void Erase(const char *File,string Pkg,string Ver,struct stat &St) - { - cout << "Del " << Pkg << " " << Ver << " [" << SizeToStr(St.st_size) << "b]" << endl; - }; - } Cleaner; + LogCleaner Cleaner; return Cleaner.Go(_config->FindDir("Dir::Cache::archives"),*Cache) && Cleaner.Go(_config->FindDir("Dir::Cache::archives") + "partial/",*Cache); -- cgit v1.2.3