From 593cf30cee476bdae21f7e99f67d2572b7381e90 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 30 Jan 2025 23:10:02 +0000 Subject: Record all available sources for descriptions Avoiding duplications is one thing, but it could also be handy to know all sources for a description so that you can e.g. avoid opening another file or similar such if its also present in one you already have open. Given how the structures were set up this was probably intended all along and either worked at some point or was abandoned for the duplicates that we started culling heavily with the introduction of MultiArch as at that point they blew up the cache and needed to be dealt with. --- cmdline/apt-cache.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cmdline') diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 4ad0b0099..67dde67a6 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -87,9 +87,10 @@ static bool DumpPackage(CommandLine &CmdL) cout << endl; for (pkgCache::DescIterator D = Cur.DescriptionList(); D.end() == false; ++D) { - cout << " Description Language: " << D.LanguageCode() << endl - << " File: " << D.FileList().File().FileName() << endl - << " MD5: " << D.md5() << endl; + cout << " Description Language: " << D.LanguageCode() << '\n'; + for (auto DF = D.FileList(); not DF.end(); ++DF) + cout << " File: " << DF.File().FileName() << '\n'; + cout << " MD5: " << D.md5() << '\n'; } cout << endl; } -- cgit v1.2.3-70-g09d2