Просмотр исходного кода

More bugs fixes
Author: jgg
Date: 1998-12-10 04:22:45 GMT
More bugs fixes

Arch Librarian лет назад: 22
Родитель
Сommit
3d61548485
7 измененных файлов с 31 добавлено и 12 удалено
  1. 5 2
      apt-pkg/depcache.cc
  2. 1 2
      apt-pkg/packagemanager.cc
  3. 4 1
      apt-pkg/sourcelist.cc
  4. 7 1
      cmdline/apt-cache.cc
  5. 5 3
      cmdline/apt-get.cc
  6. 6 1
      doc/apt-cdrom.8.yo
  7. 3 2
      methods/http.cc

+ 5 - 2
apt-pkg/depcache.cc

@@ -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;
 

+ 1 - 2
apt-pkg/packagemanager.cc

@@ -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)

+ 4 - 1
apt-pkg/sourcelist.cc

@@ -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;

+ 7 - 1
cmdline/apt-cache.cc

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

+ 5 - 3
cmdline/apt-get.cc

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

+ 6 - 1
doc/apt-cdrom.8.yo

@@ -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.

+ 3 - 2
methods/http.cc

@@ -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;
 	 }