]> git.saurik.com Git - apt.git/commitdiff
Fix suggested and recommends showlist calls, to include...
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 17:01:22 +0000 (17:01 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 17:01:22 +0000 (17:01 +0000)
Author: doogie
Date: 2003-04-27 05:59:33 GMT
Fix suggested and recommends showlist calls, to include the versions.

cmdline/apt-get.cc

index bb0414c5e78482135abd1c2bcd5eabc0aad942a2..c4b4852f90b8682c94dee286189050670cf40e47 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: apt-get.cc,v 1.128 2003/04/27 01:47:10 doogie Exp $
+// $Id: apt-get.cc,v 1.129 2003/04/27 05:59:33 doogie Exp $
 /* ######################################################################
    
    apt-get - Cover for dpkg
@@ -1507,6 +1507,7 @@ bool DoInstall(CommandLine &CmdL)
    /* Print out a list of suggested and recommended packages */
    {
       string SuggestsList, RecommendsList, List;
+      string SuggestsVersions, RecommendsVersions;
       for (unsigned J = 0; J < Cache->Head().PackageCount; J++)
       {
         pkgCache::PkgIterator I(Cache,Cache.List[J]);
@@ -1537,6 +1538,7 @@ bool DoInstall(CommandLine &CmdL)
                       if (int(SuggestsList.find(target)) > -1)
                         break; 
                       SuggestsList += target;
+                      SuggestsVersions += string(Cache[Start.TargetPkg()].CandVersion) + "\n";
                     }
                     
                     if (Start->Type == pkgCache::Dep::Recommends) {
@@ -1554,6 +1556,7 @@ bool DoInstall(CommandLine &CmdL)
                       if (int(RecommendsList.find(target)) > -1)
                         break;
                       RecommendsList += target;
+                      SuggestsVersions += string(Cache[Start.TargetPkg()].CandVersion) + "\n";
                     }
              if (Start == End)
                break;
@@ -1562,8 +1565,8 @@ bool DoInstall(CommandLine &CmdL)
               }
           }
       }
-      ShowList(c1out,_("Suggested packages:"),SuggestsList);
-      ShowList(c1out,_("Recommended packages:"),RecommendsList);
+      ShowList(c1out,_("Suggested packages:"),SuggestsList,SuggestsVersions);
+      ShowList(c1out,_("Recommended packages:"),RecommendsList,RecommendsVersions);
 
    }