summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-11-25 16:35:02 +0100
committerMichael Vogt <mvo@debian.org>2013-11-25 16:35:02 +0100
commit500347df3c544b1633215477d485d43103732743 (patch)
tree9ac3a07630c2e89496e681e9c0184f5d6bad3933 /apt-private
parent61f954bff040809e7ab57b3adec2fe95339ffb94 (diff)
do not show summary in "apt list"
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/private-list.cc2
-rw-r--r--apt-private/private-output.cc12
-rw-r--r--apt-private/private-output.h3
3 files changed, 11 insertions, 6 deletions
diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc
index 8c61fcae8..6993cd797 100644
--- a/apt-private/private-list.cc
+++ b/apt-private/private-list.cc
@@ -149,7 +149,7 @@ bool List(CommandLine &Cmd)
output_map.insert(std::make_pair<std::string, std::string>(
V.ParentPkg().Name(), outs.str()));
} else {
- ListSingleVersion(CacheFile, records, V, outs);
+ ListSingleVersion(CacheFile, records, V, outs, false);
output_map.insert(std::make_pair<std::string, std::string>(
V.ParentPkg().Name(), outs.str()));
}
diff --git a/apt-private/private-output.cc b/apt-private/private-output.cc
index 6fadf7274..91d13f31b 100644
--- a/apt-private/private-output.cc
+++ b/apt-private/private-output.cc
@@ -158,7 +158,8 @@ std::string GetShortDescription(pkgCacheFile &CacheFile, pkgRecords &records, pk
}
/*}}}*/
void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records, /*{{{*/
- pkgCache::VerIterator V, std::ostream &out)
+ pkgCache::VerIterator V, std::ostream &out,
+ bool include_summary)
{
pkgCache::PkgIterator P = V.ParentPkg();
@@ -224,9 +225,12 @@ void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records, /*{{{*/
out << GetVersion(CacheFile, V);
}
out << " " << GetArchitecture(CacheFile, P) << " ";
- out << std::endl
- << " " << GetShortDescription(CacheFile, records, P)
- << std::endl;
+ if (include_summary)
+ {
+ out << std::endl
+ << " " << GetShortDescription(CacheFile, records, P)
+ << std::endl;
+ }
}
}
/*}}}*/
diff --git a/apt-private/private-output.h b/apt-private/private-output.h
index 9283e39ab..c3c76bb92 100644
--- a/apt-private/private-output.h
+++ b/apt-private/private-output.h
@@ -24,7 +24,8 @@ extern unsigned int ScreenWidth;
bool InitOutput();
void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records,
- pkgCache::VerIterator V, std::ostream &out);
+ pkgCache::VerIterator V, std::ostream &out,
+ bool include_summary=true);