summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2022-01-21 15:11:56 +0100
committerJulian Andres Klode <jak@debian.org>2022-01-21 15:14:00 +0100
commit78981cd5ec19563cf3bca2495c56e31124ae069a (patch)
treefb0dc4d5128c612fba2111b9efbd23ab4af58ca4 /apt-private
parenta25a4d3372ca621c4a98e369578e2769029e17be (diff)
Add a --full mode to apt show
This adds back the missing fields that we do not show any other way.
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/private-cmndline.cc1
-rw-r--r--apt-private/private-show.cc18
2 files changed, 11 insertions, 8 deletions
diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc
index 9af241947..5cb282c9e 100644
--- a/apt-private/private-cmndline.cc
+++ b/apt-private/private-cmndline.cc
@@ -349,6 +349,7 @@ static bool addArgumentsAPT(std::vector<CommandLine::Args> &Args, char const * c
else if (CmdMatches("show") || CmdMatches("info"))
{
addArg('a', "all-versions", "APT::Cache::AllVersions", 0);
+ addArg('f', "full", "APT::Cache::ShowFull", 0);
}
else if (addArgumentsAPTGet(Args, Cmd) || addArgumentsAPTCache(Args, Cmd))
{
diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc
index 07b5a3ae3..b56b87d67 100644
--- a/apt-private/private-show.cc
+++ b/apt-private/private-show.cc
@@ -253,17 +253,19 @@ static bool DisplayRecordV2(pkgCacheFile &CacheFile, pkgRecords &Recs, /*{{{*/
manual_installed = !(state.Flags & pkgCache::Flag::Auto) ? "yes" : "no";
}
- // FIXME: add verbose that does not do the removal of the tags?
std::vector<pkgTagSection::Tag> RW;
// delete, apt-cache show has this info and most users do not care
- RW.push_back(pkgTagSection::Tag::Remove("MD5sum"));
- RW.push_back(pkgTagSection::Tag::Remove("SHA1"));
- RW.push_back(pkgTagSection::Tag::Remove("SHA256"));
- RW.push_back(pkgTagSection::Tag::Remove("SHA512"));
- RW.push_back(pkgTagSection::Tag::Remove("Filename"));
- RW.push_back(pkgTagSection::Tag::Remove("Multi-Arch"));
+ if (not _config->FindB("APT::Cache::ShowFull", false))
+ {
+ RW.push_back(pkgTagSection::Tag::Remove("MD5sum"));
+ RW.push_back(pkgTagSection::Tag::Remove("SHA1"));
+ RW.push_back(pkgTagSection::Tag::Remove("SHA256"));
+ RW.push_back(pkgTagSection::Tag::Remove("SHA512"));
+ RW.push_back(pkgTagSection::Tag::Remove("Filename"));
+ RW.push_back(pkgTagSection::Tag::Remove("Multi-Arch"));
+ RW.push_back(pkgTagSection::Tag::Remove("Conffiles"));
+ }
RW.push_back(pkgTagSection::Tag::Remove("Architecture"));
- RW.push_back(pkgTagSection::Tag::Remove("Conffiles"));
// we use the translated description
RW.push_back(pkgTagSection::Tag::Remove("Description"));
RW.push_back(pkgTagSection::Tag::Remove("Description-md5"));