diff options
author | Kusanagi Kouichi <slash@ac.auone-net.jp> | 2015-08-16 16:45:04 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2015-08-16 16:45:04 +0200 |
commit | 0e54edd2eda54637596d620a31abb3131ad0a6b4 (patch) | |
tree | 7e2591b0132fa56e8ac068e35d09ee6322fd748e /cmdline/apt-cache.cc | |
parent | fe9a05dfc97769c8494dc1744822d959639eb312 (diff) |
Show full package records in apt-cache search -f
This just changes the DoSearch code to use DisplayRecord to
display the record when the full record is requested.
Closes: #660851
[jak@debian.org: Wrote the commit message]
Diffstat (limited to 'cmdline/apt-cache.cc')
-rw-r--r-- | cmdline/apt-cache.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 75337fa07..f7abb823d 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1332,6 +1332,7 @@ static bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V) struct ExDescFile { pkgCache::DescFile *Df; + pkgCache::VerIterator V; map_id_t ID; }; @@ -1417,6 +1418,7 @@ static bool Search(CommandLine &CmdL) if (D.end() == true) continue; DFList[G->ID].Df = D.FileList(); + DFList[G->ID].V = V; DFList[G->ID].ID = G->ID; } @@ -1436,6 +1438,7 @@ static bool Search(CommandLine &CmdL) if (D.end() == true) continue; DFList[id].Df = D.FileList(); + DFList[id].V = V; DFList[id].ID = id; size_t const PrvPatternOffset = id * NumPatterns; @@ -1477,13 +1480,7 @@ static bool Search(CommandLine &CmdL) if (matchedAll == true) { if (ShowFull == true) - { - const char *Start; - const char *End; - P.GetRec(Start,End); - fwrite(Start,End-Start,1,stdout); - putc('\n',stdout); - } + DisplayRecord(CacheFile, J->V); else printf("%s - %s\n",P.Name().c_str(),P.ShortDesc().c_str()); } |