]> git.saurik.com Git - apt.git/commitdiff
Minor fixes
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:52:47 +0000 (16:52 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:52:47 +0000 (16:52 +0000)
Author: jgg
Date: 1999-02-08 07:30:49 GMT
Minor fixes

apt-pkg/acquire-method.cc
apt-pkg/contrib/fileutl.cc
apt-pkg/deb/deblistparser.cc
apt-pkg/pkgcachegen.cc
cmdline/apt-get.cc
methods/http.cc

index 7f0119819f5ed34e09750ec9e0f23c824d1c9f28..9bb76e53c2d8f9e3bde3b108f18e2f258229e3f8 100644 (file)
@@ -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                               /*{{{*/
index 6baafcfcfbf6d3084f84d7168cca812ce7433c43..f34d839e3f0072e5f2e5fc900a9d7888e0b91d04 100644 (file)
@@ -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                                  /*{{{*/
index d6f25bd010443bbf999b4ad5fc127f9dc2f6a3b1..82d4f3ee935cd8b580f93aac190bfe19fe955a72 100644 (file)
@@ -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;
 }
                                                                        /*}}}*/
index 89bcec801eb6cf6be1942430b8163d136b0082fc..959075c0f67e602aa892852c0f5af498500a1822 100644 (file)
@@ -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());
index e99c832c4ae30f8ca744037d1eef7beb50178c22..8e5d7356a59fa2ddfb6d9bd63aa3608adec3be0c 100644 (file)
@@ -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);
index 9cb6d1b21bfddd85a60975134ffc35e4aeb0537d..033e6283f5625d72983698c7f11b166bf49a14ef 100644 (file)
@@ -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>