]> git.saurik.com Git - apt.git/blobdiff - apt-private/private-list.cc
Merge remote-tracking branch 'mvo/feature/source-deb822' into debian/experimental...
[apt.git] / apt-private / private-list.cc
index 680a9a53515f38931a62d3e55c45d05f27b1b8b3..fbb66d20425e9e4b8f21b395e7e5ff0e41be8f2c 100644 (file)
@@ -101,11 +101,15 @@ private:
                                                                        /*}}}*/
 void ListAllVersions(pkgCacheFile &CacheFile, pkgRecords &records,     /*{{{*/
                      pkgCache::PkgIterator P,    
-                     std::ostream &outs)
+                     std::ostream &outs,
+                     bool include_summary=true)
 {
    for (pkgCache::VerIterator Ver = P.VersionList();
         Ver.end() == false; Ver++) 
-      ListSingleVersion(CacheFile, records, Ver, outs);
+   {
+      ListSingleVersion(CacheFile, records, Ver, outs, include_summary);
+      outs << "\n";
+   }
 }
                                                                        /*}}}*/
 // list - list package based on criteria                               /*{{{*/
@@ -132,9 +136,11 @@ bool List(CommandLine &Cmd)
    std::map<std::string, std::string> output_map;
    std::map<std::string, std::string>::const_iterator K;
 
+   bool includeSummary = _config->FindB("APT::Cmd::List-Include-Summary");
+
    PackageNameMatcher matcher(patterns);
    LocalitySortedVersionSet bag;
-   OpTextProgress progress;
+   OpTextProgress progress(*_config);
    progress.OverallProgress(0,
                             Cache->Head().PackageCount, 
                             Cache->Head().PackageCount,
@@ -145,11 +151,11 @@ bool List(CommandLine &Cmd)
       std::stringstream outs;
       if(_config->FindB("APT::Cmd::All-Versions", false) == true)
       {
-         ListAllVersions(CacheFile, records, V.ParentPkg(), outs);
+         ListAllVersions(CacheFile, records, V.ParentPkg(), outs, includeSummary);
          output_map.insert(std::make_pair<std::string, std::string>(
             V.ParentPkg().Name(), outs.str()));
       } else {
-         ListSingleVersion(CacheFile, records, V, outs, false);
+         ListSingleVersion(CacheFile, records, V, outs, includeSummary);
          output_map.insert(std::make_pair<std::string, std::string>(
                            V.ParentPkg().Name(), outs.str()));
       }