summaryrefslogtreecommitdiff
path: root/cmdline/apt-cache.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-06-12 15:48:00 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-06-15 14:39:37 +0200
commitd2cb5b153fb13d587b1ff632cab34ce0c403326e (patch)
tree2f95c69f24f8d0dbbd4a4c6a08a9b97a7651e1e9 /cmdline/apt-cache.cc
parente185d8b3e39e3840f439cab7d5d265fd96d84c6f (diff)
hide Translation-* in 'apt-cache policy' output
Translation-* files are internally handled as PackageFiles which isn't super nice, but giving them their own struct is a bit overkill so let it be for the moment. They always appeared in the policy output because of this through and now that they are properly linked to a ReleaseFile they even display all the pinning information on them, but they don't contain any packages which could be pinned… No problem, but useless and potentially confusing output. Adding a 'NoPackages' flag which can be set on those files and be used in applications seems like a simple way to fix this display issue.
Diffstat (limited to 'cmdline/apt-cache.cc')
-rw-r--r--cmdline/apt-cache.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 3b8ebc96d..c2f6dbd5c 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1638,6 +1638,8 @@ static bool Policy(CommandLine &CmdL)
cout << _("Package files:") << endl;
for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F.end() == false; ++F)
{
+ if (F.Flagged(pkgCache::Flag::NoPackages))
+ continue;
// Locate the associated index files so we can derive a description
pkgIndexFile *Indx;
if (SrcList->FindIndex(F,Indx) == false &&