summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:52:47 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:52:47 +0000
commit65a1e968442361247b646dc61843f841235114e0 (patch)
tree733c37e21376beceac7537511cf78d7160ac2892
parentbe5dbaf215aa054bdc8a5cab67e5ce429215b7aa (diff)
Minor fixes
Author: jgg Date: 1999-02-08 07:30:49 GMT Minor fixes
-rw-r--r--apt-pkg/acquire-method.cc3
-rw-r--r--apt-pkg/contrib/fileutl.cc3
-rw-r--r--apt-pkg/deb/deblistparser.cc4
-rw-r--r--apt-pkg/pkgcachegen.cc5
-rw-r--r--cmdline/apt-get.cc21
-rw-r--r--methods/http.cc3
6 files changed, 24 insertions, 15 deletions
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 <apt-pkg/fileutl.h>
#include <stdio.h>
+#include <unistd.h>
/*}}}*/
// 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 <sys/stat.h>
#include <sys/fcntl.h>
#include <sys/types.h>
+#include <errno.h>
/*}}}*/
// 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 <sys/ioctl.h>
#include <sys/stat.h>
#include <signal.h>
+#include <unistd.h>
#include <stdio.h>
/*}}}*/
@@ -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 <unistd.h>
#include <signal.h>
#include <stdio.h>
+#include <errno.h>
// Internet stuff
#include <netinet/in.h>