diff options
| author | David Kalnischkies <david@kalnischkies.de> | 2022-04-01 11:37:26 +0200 |
|---|---|---|
| committer | David Kalnischkies <david@kalnischkies.de> | 2022-04-01 14:16:19 +0200 |
| commit | 05fae6fae95d8ef6690f3d56863e3bb6a44d424c (patch) | |
| tree | c948709ce9b2e4f4bc6e11138c3c21671d3baf37 /apt-private | |
| parent | 472376be6818b5ea43250abcbecfcab53b4a729a (diff) | |
Parse Checksum fields via pkgTagSection::Key, too
We abstract hashes a fair bit to be able to add new ones eventually,
which lead us to building the field names on the fly. We can do better
through by keeping a central place for these names, too, which even
helps in reducing code as we don't need the MD5 → Files dance anymore.
Diffstat (limited to 'apt-private')
| -rw-r--r-- | apt-private/private-show.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc index 46c4c35e7..08a4fe6df 100644 --- a/apt-private/private-show.cc +++ b/apt-private/private-show.cc @@ -260,10 +260,8 @@ static bool DisplayRecordV2(pkgCacheFile &CacheFile, pkgRecords &Recs, /*{{{*/ // delete, apt-cache show has this info and most users do not care 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")); + for (char const * const * type = HashString::SupportedHashes(); *type != nullptr; ++type) + RW.push_back(pkgTagSection::Tag::Remove(*type)); RW.push_back(pkgTagSection::Tag::Remove("Filename")); RW.push_back(pkgTagSection::Tag::Remove("Multi-Arch")); RW.push_back(pkgTagSection::Tag::Remove("Conffiles")); |
