summaryrefslogtreecommitdiff
path: root/apt-pkg/tagfile.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-01-08 21:07:37 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2015-03-16 18:01:13 +0100
commit2f6a2fbbdc9f76dc4eace83a427013f4e1c03afc (patch)
treec831f594596241ef1ef56c20dbd1f4e39a6840b9 /apt-pkg/tagfile.cc
parent3de7789a75c58204bcc979c72899cfdacba4e2ac (diff)
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.
Diffstat (limited to 'apt-pkg/tagfile.cc')
-rw-r--r--apt-pkg/tagfile.cc6
1 files changed, 3 insertions, 3 deletions
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;
}