summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-01-24 22:20:28 +0100
committerMichael Vogt <mvo@debian.org>2014-01-24 22:20:28 +0100
commit17622532ce19a1bcebfebdfc9ec20a7e3df9dbff (patch)
treece7649e267efdb350b27d3a674fc0ac1de4b257b /apt-private
parent1179953a0bbf82ba22a2692586ce4f1936b2bdc9 (diff)
hide more from apt show
Hide the Hashes,Filename,Multi-Arch,Architecture by default from "apt show". The information is still available via apt-cache show. Also improve the output of the Size-
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/private-show.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc
index ba8b266ee..60d951316 100644
--- a/apt-private/private-show.cc
+++ b/apt-private/private-show.cc
@@ -76,12 +76,12 @@ bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V,
// make size nice
std::string installed_size;
if (Tags.FindI("Installed-Size") > 0)
- installed_size = SizeToStr(Tags.FindI("Installed-Size")*1024);
+ strprintf(installed_size, "%sB", SizeToStr(Tags.FindI("Installed-Size")*1024).c_str());
else
installed_size = _("unknown");
std::string package_size;
if (Tags.FindI("Size") > 0)
- package_size = SizeToStr(Tags.FindI("Size"));
+ strprintf(package_size, "%sB", SizeToStr(Tags.FindI("Size")).c_str());
else
package_size = _("unknown");
@@ -92,9 +92,18 @@ bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V,
manual_installed = !(state.Flags & pkgCache::Flag::Auto) ? "yes" : "no";
else
manual_installed = 0;
+
+ // FIXME: add verbose that does not do the removal of the tags?
TFRewriteData RW[] = {
- // delete
+ // delete, apt-cache show has this info and most users do not care
+ {"MD5sum", 0},
+ {"SHA1", 0},
+ {"SHA256", 0},
+ {"Filename", 0},
+ {"Multi-Arch", 0},
+ {"Architecture", 0},
{"Conffiles",0},
+ // we use the translated description
{"Description",0},
{"Description-md5",0},
// improve