From: Arch Librarian Date: Mon, 20 Sep 2004 16:52:47 +0000 (+0000) Subject: Minor fixes X-Git-Tag: 0.7.24ubuntu1~1478 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/65a1e968442361247b646dc61843f841235114e0 Minor fixes Author: jgg Date: 1999-02-08 07:30:49 GMT Minor fixes --- diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc index 7f0119819..9bb76e53c 100644 --- a/apt-pkg/acquire-method.cc +++ b/apt-pkg/acquire-method.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire-method.cc,v 1.16 1999/01/27 02:48:52 jgg Exp $ +// $Id: acquire-method.cc,v 1.17 1999/02/08 07:30:49 jgg Exp $ /* ###################################################################### Acquire Method @@ -18,6 +18,7 @@ #include #include +#include /*}}}*/ // AcqMethod::pkgAcqMethod - Constructor /*{{{*/ diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 6baafcfcf..f34d839e3 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: fileutl.cc,v 1.18 1999/02/03 23:13:37 jgg Exp $ +// $Id: fileutl.cc,v 1.19 1999/02/08 07:30:50 jgg Exp $ /* ###################################################################### File Utilities @@ -24,6 +24,7 @@ #include #include #include +#include /*}}}*/ // CopyFile - Buffered copy of a file /*{{{*/ diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index d6f25bd01..82d4f3ee9 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: deblistparser.cc,v 1.15 1999/02/01 02:22:11 jgg Exp $ +// $Id: deblistparser.cc,v 1.16 1999/02/08 07:30:50 jgg Exp $ /* ###################################################################### Package Cache Generator - Generator for the cache structure. @@ -44,7 +44,7 @@ string debListParser::Package() { string Result = Section.FindS("Package"); if (Result.empty() == true) - _error->Error("Encoutered a section with no Package: header"); + _error->Error("Encountered a section with no Package: header"); return Result; } /*}}}*/ diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 89bcec801..959075c0f 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcachegen.cc,v 1.27 1999/01/27 02:48:52 jgg Exp $ +// $Id: pkgcachegen.cc,v 1.28 1999/02/08 07:30:49 jgg Exp $ /* ###################################################################### Package Cache Generator - Generator for the cache structure. @@ -74,6 +74,9 @@ bool pkgCacheGenerator::MergeList(ListParser &List) { // Get a pointer to the package structure string PackageName = List.Package(); + if (PackageName.empty() == true) + return false; + pkgCache::PkgIterator Pkg; if (NewPackage(Pkg,PackageName) == false) return _error->Error("Error occured while processing %s (NewPackage)",PackageName.c_str()); 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); diff --git a/methods/http.cc b/methods/http.cc index 9cb6d1b21..033e6283f 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: http.cc,v 1.24 1999/01/30 08:23:49 jgg Exp $ +// $Id: http.cc,v 1.25 1999/02/08 07:30:50 jgg Exp $ /* ###################################################################### HTTP Aquire Method - This is the HTTP aquire method for APT. @@ -38,6 +38,7 @@ #include #include #include +#include // Internet stuff #include