More bugs fixes
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:52:08 +0000 (16:52 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:52:08 +0000 (16:52 +0000)
Author: jgg
Date: 1998-12-10 04:22:45 GMT
More bugs fixes

apt-pkg/depcache.cc
apt-pkg/packagemanager.cc
apt-pkg/sourcelist.cc
cmdline/apt-cache.cc
cmdline/apt-get.cc
doc/apt-cdrom.8.yo
methods/http.cc

index 7f9ded7208630a1b037bab93ee88d1e87db1cfb9..eb9d5a35be97b1edb9dd412fa19ba5fd3a2a2bec 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: depcache.cc,v 1.10 1998/12/08 01:34:07 jgg Exp $
+// $Id: depcache.cc,v 1.11 1998/12/10 04:22:45 jgg Exp $
 /* ######################################################################
 
    Dependency Cache - Caches Dependency information.
@@ -588,7 +588,10 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg)
    RemoveSizes(Pkg);
    RemoveStates(Pkg);
    
-   P.Mode = ModeDelete;
+   if (Pkg->CurrentVer == 0)
+      P.Mode = ModeKeep;
+   else
+      P.Mode = ModeDelete;
    P.InstallVer = 0;
    P.Flags &= Flag::Auto;
 
index dd9d8586d0e8ea72fe17427460aceb04e2b39eca..3fc88586bcd2c03fd720dddc04d2084287a507f9 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: packagemanager.cc,v 1.9 1998/12/08 01:34:12 jgg Exp $
+// $Id: packagemanager.cc,v 1.10 1998/12/10 04:22:46 jgg Exp $
 /* ######################################################################
 
    Package Manager - Abstacts the package manager
@@ -371,7 +371,6 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg)
    if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure &&
        Cache[Pkg].Keep() == true)
    {
-      cout << "Bailing" << endl;
       List->Flag(Pkg,pkgOrderList::UnPacked,pkgOrderList::States);
       if (List->IsFlag(Pkg,pkgOrderList::Immediate) == true)
         if (SmartConfigure(Pkg) == false)
index c3fb5642f3a8ea66396dd65013162f61f7d8a19f..371898810c84885411c071e9f2dd9430fab363c1 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: sourcelist.cc,v 1.8 1998/10/20 04:33:15 jgg Exp $
+// $Id: sourcelist.cc,v 1.9 1998/12/10 04:22:47 jgg Exp $
 /* ######################################################################
 
    List of Sources
@@ -254,6 +254,9 @@ string pkgSourceList::Item::ArchiveInfo(pkgCache::VerIterator Ver) const
       
       Res += " ";
       Res += Ver.ParentPkg().Name();
+      Res += " ";
+      Res += Ver.VerStr();
+      
       break;
    };
    return Res;
index b20227153cbb0fa63a82f94cecf0b7853c18e8eb..429c36a3d41c89430c93c60f49a77732daf044d6 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: apt-cache.cc,v 1.16 1998/12/07 00:34:22 jgg Exp $
+// $Id: apt-cache.cc,v 1.17 1998/12/10 04:22:48 jgg Exp $
 /* ######################################################################
    
    apt-cache - Manages the cache files
@@ -498,6 +498,12 @@ int main(int argc,const char *argv[])
    
    while (1)
    {
+      if (strcmp(CmdL.FileList[0],"add") == 0)
+      {
+        ShowHelp();
+        break;
+      }
+      
       if (strcmp(CmdL.FileList[0],"add") == 0)
       {
         DoAdd(CmdL);
index fbfaf7303f0ceacffa67a94bda2035c852c9cea8..a17d0ce2f823636a9fb2e30074c32d1def6218af 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: apt-get.cc,v 1.28 1998/12/08 23:52:24 jgg Exp $
+// $Id: apt-get.cc,v 1.29 1998/12/10 04:22:51 jgg Exp $
 /* ######################################################################
    
    apt-get - Cover for dpkg
@@ -208,6 +208,7 @@ void ShowDel(ostream &out,pkgDepCache &Dep)
    for (;I.end() != true; I++)
       if (Dep[I].Delete() == true)
         List += string(I.Name()) + " ";
+   
    ShowList(out,"The following packages will be REMOVED:",List);
 }
                                                                        /*}}}*/
@@ -958,7 +959,7 @@ bool DoCheck(CommandLine &CmdL)
 // ShowHelp - Show a help screen                                       /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-int ShowHelp()
+int ShowHelp(CommandLine &CmdL)
 {
    cout << PACKAGE << ' ' << VERSION << " for " << ARCHITECTURE <<
        " compiled on " << __DATE__ << "  " << __TIME__ << endl;
@@ -1057,6 +1058,7 @@ int main(int argc,const char *argv[])
                                    {"dselect-upgrade",&DoDSelectUpgrade},
                                    {"clean",&DoClean},
                                    {"check",&DoCheck},
+                                  {"help",&ShowHelp},
                                    {0,0}};
    
    // Parse the command line and initialize the package library
@@ -1071,7 +1073,7 @@ int main(int argc,const char *argv[])
    // See if the help should be shown
    if (_config->FindB("help") == true ||
        CmdL.FileSize() == 0)
-      return ShowHelp();
+      return ShowHelp(CmdL);
 
    // Setup the output streams
    c0out.rdbuf(cout.rdbuf());
index 5c1f13b6fea1e466f83827daf75ead5197b428bb..4811578e3db2e3c432c92026223a3fbca3c7132d 100644 (file)
@@ -63,7 +63,12 @@ Fast Copy; Assume the package files are valid and do not check every package.
 This option should be used only if bf(apt-cdrom) has been run on this disc
 before and did not detect any errors.
 See bf(APT::CDROM::Fast).
+
+dit(bf(-a, --thorough))
+Thorough Package Scan; This option may be needed with some old Debian 1.1/1.2
+burns that have Package files in strange places. It takes much longer to
+scan the CD but will pick them all up.
+
 dit(bf(-n --just-print, --recon, --no-act))
 No Changes; Do not change the sources.list and do not write package files. 
 Everything is still checked however.
index c5a227dd70f60022aac86a92c0d52dc4675d9e24..20d976340c14d79c6fe05062ad68004065b48971 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: http.cc,v 1.11 1998/12/07 07:32:03 jgg Exp $
+// $Id: http.cc,v 1.12 1998/12/10 04:22:53 jgg Exp $
 /* ######################################################################
 
    HTTP Aquire Method - This is the HTTP aquire method for APT.
@@ -791,6 +791,7 @@ bool HttpMethod::ServerDie(ServerState *Srv)
    if (Srv->In.IsLimit() == false && Srv->State != ServerState::Header && 
        Srv->Encoding != ServerState::Closes)
    {
+      Srv->Close();
       if (errno == 0)
         return _error->Error("Error reading from server Remote end closed connection");
       return _error->Errno("read","Error reading from server");
@@ -1005,7 +1006,7 @@ int HttpMethod::Loop()
         case 1:
         {
            FailCounter++;
-           _error->DumpErrors();
+           _error->Discard();
            Server->Close();
            continue;
         }