From 2f6a2fbbdc9f76dc4eace83a427013f4e1c03afc Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 8 Jan 2015 21:07:37 +0100 Subject: properly implement pkgRecord::Parser for *.deb files Implementing FileName() works for most cases for us, but other frontends might need more and even for us its not very stable as the normal Jump() implementation is pretty bad on a deb file and produce errors on its own at times. So, replacing this makeshift with a complete implementation by mostly just shuffling code around. --- apt-pkg/tagfile.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apt-pkg/tagfile.cc') diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 590206f17..9c40c8c92 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -183,8 +183,8 @@ bool pkgTagFile::Step(pkgTagSection &Tag) break; if (Resize() == false) - return _error->Error(_("Unable to parse package file %s (1)"), - d->Fd.Name().c_str()); + return _error->Error(_("Unable to parse package file %s (%d)"), + d->Fd.Name().c_str(), 1); } while (Tag.Scan(d->Start,d->End - d->Start, false) == false); } @@ -283,7 +283,7 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long long Offset) return false; if (Tag.Scan(d->Start, d->End - d->Start, false) == false) - return _error->Error(_("Unable to parse package file %s (2)"),d->Fd.Name().c_str()); + return _error->Error(_("Unable to parse package file %s (%d)"),d->Fd.Name().c_str(), 2); return true; } -- cgit v1.2.3