Browse Source

Minor fixes

Author: jgg
Date: 1999-02-08 07:30:49 GMT
Minor fixes
debian/1.8.y
Arch Librarian 18 years ago
parent
commit
65a1e96844
  1. 3
      apt-pkg/acquire-method.cc
  2. 3
      apt-pkg/contrib/fileutl.cc
  3. 4
      apt-pkg/deb/deblistparser.cc
  4. 5
      apt-pkg/pkgcachegen.cc
  5. 21
      cmdline/apt-get.cc
  6. 3
      methods/http.cc

3
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 /*{{{*/

3
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 /*{{{*/

4
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;
}
/*}}}*/

5
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());

21
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);

3
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>

Loading…
Cancel
Save