From 409ceec9ed30cbebd8ece1ef7ce667ab5a32f9df Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 15 Aug 2018 00:23:37 +0200 Subject: Support records larger than 32kb in 'apt show' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default buffer size for pkgTagFile is 32kb which should be big enough for everything… expect for enormous lists of provides, resulting in: $ apt show librust-winapi-dev E: Unable to parse package file /var/lib/apt/lists/ftp.br.debian.org_debian_dists_unstable_main_binary-amd64_Packages (2) E: Internal Error, Unable to parse a package record The "apt-cache show" codepath uses instead a max size for all files, which seems a bit excessive, but works – using the max size for the file in question seems most appropriate. The patch is written for the 1.6.y series as a rewrite of the related code in the 1.7.y series (commit bf53f39c9a0221b670ffff74053ed36fc502d5a0) removed this problem before it was reported. Closes: #905527 LP: #1787120 --- apt-private/private-show.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-private') diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc index afe448a33..0403fbed7 100644 --- a/apt-private/private-show.cc +++ b/apt-private/private-show.cc @@ -177,9 +177,9 @@ static bool DisplayRecordV2(pkgCacheFile &CacheFile, pkgCache::VerIterator const // Read the record pkgTagSection Tags; - pkgTagFile TagF(&PkgF); + pkgTagFile TagF(&PkgF, Vf->Size); - if (TagF.Jump(Tags, V.FileList()->Offset) == false) + if (TagF.Jump(Tags, Vf->Offset) == false) return _error->Error("Internal Error, Unable to parse a package record"); // make size nice -- cgit v1.2.3