]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
Add missing \n
[apt.git] / cmdline / apt-get.cc
index 04f18b162b8998e785a281cf6507146800ea29fa..1e3a946638b451e507b81e22a9b629fbd8fe012c 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: apt-get.cc,v 1.102 2001/02/27 02:51:03 tausq Exp $
+// $Id: apt-get.cc,v 1.106 2001/04/28 01:18:37 doogie Exp $
 /* ######################################################################
    
    apt-get - Cover for dpkg
@@ -232,6 +232,9 @@ void ShowBroken(ostream &out,CacheFile &Cache,bool Now)
            {
               out << ' ';
               pkgCache::VerIterator Ver = Cache[Targ].InstVerIter(Cache);
+              if (Now == true)
+                 Ver = Targ.CurrentVer();
+                 
               if (Ver.end() == false)
               {
                  if (Now == true)
@@ -429,7 +432,7 @@ bool ShowEssential(ostream &out,CacheFile &Cache)
            Added[P->ID] = true;
            
            char S[300];
-           sprintf(S,_("%s (due to %s) "),P.Name(),I.Name());
+           snprintf(S,sizeof(S),_("%s (due to %s) "),P.Name(),I.Name());
            List += S;
         }       
       }      
@@ -930,8 +933,8 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache,
           "of sources.list\n"),Pkg.Name());
         
         string List;
-        SPtrArray<bool> Seen = new bool[Cache.Head().PackageFileCount];
-        memset(Seen,0,Cache.Head().PackageFileCount*sizeof(*Seen));
+        SPtrArray<bool> Seen = new bool[Cache.Head().PackageCount];
+        memset(Seen,0,Cache.Head().PackageCount*sizeof(*Seen));
         pkgCache::DepIterator Dep = Pkg.RevDependsList();
         for (; Dep.end() == false; Dep++)
         {
@@ -965,7 +968,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache,
       if (_config->FindB("APT::Get::ReInstall",false) == true)
       {
         if (Pkg->CurrentVer == 0 || Pkg.CurrentVer().Downloadable() == false)
-           ioprintf(c1out,_("Sorry, re-installation of %s is not possible, it cannot be downloaded."),
+           ioprintf(c1out,_("Sorry, re-installation of %s is not possible, it cannot be downloaded.\n"),
                     Pkg.Name());
         else
            Cache.SetReInstall(Pkg,true);