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/deb/debindexfile.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'apt-pkg/deb/debindexfile.h') diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h index 312e915f1..81914f203 100644 --- a/apt-pkg/deb/debindexfile.h +++ b/apt-pkg/deb/debindexfile.h @@ -177,6 +177,14 @@ class APT_HIDDEN debDebPkgFileIndex : public pkgIndexFile return DebFile; } + /** get the control (file) content of the deb file + * + * @param[out] content of the control file + * @param debfile is the filename of the .deb-file + * @return \b true if successful, otherwise \b false. + */ + static bool GetContent(std::ostream &content, std::string const &debfile); + // Interface for the Cache Generator virtual bool Exists() const; virtual bool HasPackages() const { -- cgit v1.2.3