summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/debfile.cc250
-rw-r--r--apt-pkg/deb/debfile.h95
-rw-r--r--apt-pkg/deb/debindexfile.cc43
-rw-r--r--apt-pkg/deb/debindexfile.h10
-rw-r--r--apt-pkg/deb/deblistparser.h8
-rw-r--r--apt-pkg/deb/debmetaindex.cc7
-rw-r--r--apt-pkg/deb/debrecords.h2
-rw-r--r--apt-pkg/deb/debsrcrecords.cc41
-rw-r--r--apt-pkg/deb/debsrcrecords.h1
-rw-r--r--apt-pkg/deb/dpkgpm.cc15
-rw-r--r--apt-pkg/deb/dpkgpm.h4
11 files changed, 377 insertions, 99 deletions
diff --git a/apt-pkg/deb/debfile.cc b/apt-pkg/deb/debfile.cc
new file mode 100644
index 000000000..f8d752e7f
--- /dev/null
+++ b/apt-pkg/deb/debfile.cc
@@ -0,0 +1,250 @@
+// -*- mode: cpp; mode: fold -*-
+// Description /*{{{*/
+/* ######################################################################
+
+ Debian Archive File (.deb)
+
+ .DEB archives are AR files containing two tars and an empty marker
+ member called 'debian-binary'. The two tars contain the meta data and
+ the actual archive contents. Thus this class is a very simple wrapper
+ around ar/tar to simply extract the right tar files.
+
+ It also uses the deb package list parser to parse the control file
+ into the cache.
+
+ ##################################################################### */
+ /*}}}*/
+// Include Files /*{{{*/
+#include <config.h>
+
+#include <apt-pkg/aptconfiguration.h>
+#include <apt-pkg/arfile.h>
+#include <apt-pkg/debfile.h>
+#include <apt-pkg/dirstream.h>
+#include <apt-pkg/error.h>
+#include <apt-pkg/extracttar.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/tagfile.h>
+
+#include <string>
+#include <vector>
+#include <string.h>
+#include <sys/stat.h>
+
+#include <apti18n.h>
+ /*}}}*/
+
+// DebFile::debDebFile - Constructor /*{{{*/
+// ---------------------------------------------------------------------
+/* Open the AR file and check for consistency */
+debDebFile::debDebFile(FileFd &File) : File(File), AR(File)
+{
+ if (_error->PendingError() == true)
+ return;
+
+ if (!CheckMember("debian-binary")) {
+ _error->Error(_("This is not a valid DEB archive, missing '%s' member"), "debian-binary");
+ return;
+ }
+
+ if (!CheckMember("control.tar") &&
+ !CheckMember("control.tar.gz") &&
+ !CheckMember("control.tar.xz") &&
+ !CheckMember("control.tar.zst"))
+ {
+ _error->Error(_("This is not a valid DEB archive, missing '%s' member"), "control.tar");
+ return;
+ }
+
+ if (!CheckMember("data.tar") &&
+ !CheckMember("data.tar.gz") &&
+ !CheckMember("data.tar.bz2") &&
+ !CheckMember("data.tar.lzma") &&
+ !CheckMember("data.tar.xz") &&
+ !CheckMember("data.tar.zst"))
+ {
+ _error->Error(_("This is not a valid DEB archive, missing '%s' member"), "data.tar");
+ return;
+ }
+}
+ /*}}}*/
+// DebFile::CheckMember - Check if a named member is in the archive /*{{{*/
+// ---------------------------------------------------------------------
+/* This is used to check for a correct deb and to give nicer error messages
+ for people playing around. */
+bool debDebFile::CheckMember(const char *Name)
+{
+ if (AR.FindMember(Name) == 0)
+ return false;
+ return true;
+}
+ /*}}}*/
+// DebFile::GotoMember - Jump to a Member /*{{{*/
+// ---------------------------------------------------------------------
+/* Jump in the file to the start of a named member and return the information
+ about that member. The caller can then read from the file up to the
+ returned size. Note, since this relies on the file position this is
+ a destructive operation, it also changes the last returned Member
+ structure - so don't nest them! */
+const ARArchive::Member *debDebFile::GotoMember(const char *Name)
+{
+ // Get the archive member and positition the file
+ const ARArchive::Member *Member = AR.FindMember(Name);
+ if (Member == 0)
+ {
+ return 0;
+ }
+ if (File.Seek(Member->Start) == false)
+ return 0;
+
+ return Member;
+}
+ /*}}}*/
+// DebFile::ExtractTarMember - Extract the contents of a tar member /*{{{*/
+// ---------------------------------------------------------------------
+/* Simple wrapper around tar.. */
+bool debDebFile::ExtractTarMember(pkgDirStream &Stream,const char *Name)
+{
+ // Get the archive member
+ const ARArchive::Member *Member = NULL;
+ std::string Compressor;
+
+ std::vector<APT::Configuration::Compressor> compressor = APT::Configuration::getCompressors();
+ for (std::vector<APT::Configuration::Compressor>::const_iterator c = compressor.begin();
+ c != compressor.end(); ++c)
+ {
+ Member = AR.FindMember(std::string(Name).append(c->Extension).c_str());
+ if (Member == NULL)
+ continue;
+ Compressor = c->Name;
+ break;
+ }
+
+ if (Member == NULL)
+ Member = AR.FindMember(std::string(Name).c_str());
+
+ if (Member == NULL)
+ {
+ std::string ext = std::string(Name) + ".{";
+ for (std::vector<APT::Configuration::Compressor>::const_iterator c = compressor.begin();
+ c != compressor.end(); ++c) {
+ if (!c->Extension.empty())
+ ext.append(c->Extension.substr(1));
+ }
+ ext.append("}");
+ return _error->Error(_("Internal error, could not locate member %s"), ext.c_str());
+ }
+
+ if (File.Seek(Member->Start) == false)
+ return false;
+
+ // Prepare Tar
+ ExtractTar Tar(File,Member->Size,Compressor);
+ if (_error->PendingError() == true)
+ return false;
+ return Tar.Go(Stream);
+}
+ /*}}}*/
+// DebFile::ExtractArchive - Extract the archive data itself /*{{{*/
+// ---------------------------------------------------------------------
+/* Simple wrapper around DebFile::ExtractTarMember. */
+bool debDebFile::ExtractArchive(pkgDirStream &Stream)
+{
+ return ExtractTarMember(Stream, "data.tar");
+}
+ /*}}}*/
+
+// DebFile::ControlExtract::DoItem - Control Tar Extraction /*{{{*/
+// ---------------------------------------------------------------------
+/* This directory stream handler for the control tar handles extracting
+ it into the temporary meta directory. It only extracts files, it does
+ not create directories, links or anything else. */
+bool debDebFile::ControlExtract::DoItem(Item &Itm,int &Fd)
+{
+ if (Itm.Type != Item::File)
+ return true;
+
+ /* Cleanse the file name, prevent people from trying to unpack into
+ absolute paths, .., etc */
+ for (char *I = Itm.Name; *I != 0; I++)
+ if (*I == '/')
+ *I = '_';
+
+ /* Force the ownership to be root and ensure correct permissions,
+ go-w, the rest are left untouched */
+ Itm.UID = 0;
+ Itm.GID = 0;
+ Itm.Mode &= ~(S_IWGRP | S_IWOTH);
+
+ return pkgDirStream::DoItem(Itm,Fd);
+}
+ /*}}}*/
+
+// MemControlExtract::DoItem - Check if it is the control file /*{{{*/
+// ---------------------------------------------------------------------
+/* This sets up to extract the control block member file into a memory
+ block of just the right size. All other files go into the bit bucket. */
+bool debDebFile::MemControlExtract::DoItem(Item &Itm,int &Fd)
+{
+ // At the control file, allocate buffer memory.
+ if (Member == Itm.Name)
+ {
+ delete [] Control;
+ Control = new char[Itm.Size+2];
+ IsControl = true;
+ Fd = -2; // Signal to pass to Process
+ Length = Itm.Size;
+ }
+ else
+ IsControl = false;
+
+ return true;
+}
+ /*}}}*/
+// MemControlExtract::Process - Process extracting the control file /*{{{*/
+// ---------------------------------------------------------------------
+/* Just memcopy the block from the tar extractor and put it in the right
+ place in the pre-allocated memory block. */
+bool debDebFile::MemControlExtract::Process(Item &/*Itm*/,const unsigned char *Data,
+ unsigned long long Size,unsigned long long Pos)
+{
+ memcpy(Control + Pos, Data,Size);
+ return true;
+}
+ /*}}}*/
+// MemControlExtract::Read - Read the control information from the deb /*{{{*/
+// ---------------------------------------------------------------------
+/* This uses the internal tar extractor to fetch the control file, and then
+ it parses it into a tag section parser. */
+bool debDebFile::MemControlExtract::Read(debDebFile &Deb)
+{
+ if (Deb.ExtractTarMember(*this, "control.tar") == false)
+ return false;
+
+ if (Control == 0)
+ return true;
+
+ Control[Length] = '\n';
+ Control[Length+1] = '\n';
+ if (Section.Scan(Control,Length+2) == false)
+ return _error->Error(_("Unparsable control file"));
+ return true;
+}
+ /*}}}*/
+// MemControlExtract::TakeControl - Parse a memory block /*{{{*/
+// ---------------------------------------------------------------------
+/* The given memory block is loaded into the parser and parsed as a control
+ record. */
+bool debDebFile::MemControlExtract::TakeControl(const void *Data,unsigned long long Size)
+{
+ delete [] Control;
+ Control = new char[Size+2];
+ Length = Size;
+ memcpy(Control,Data,Size);
+
+ Control[Length] = '\n';
+ Control[Length+1] = '\n';
+ return Section.Scan(Control,Length+2);
+}
+ /*}}}*/
+
diff --git a/apt-pkg/deb/debfile.h b/apt-pkg/deb/debfile.h
new file mode 100644
index 000000000..21c59a567
--- /dev/null
+++ b/apt-pkg/deb/debfile.h
@@ -0,0 +1,95 @@
+// -*- mode: cpp; mode: fold -*-
+// Description /*{{{*/
+/* ######################################################################
+
+ Debian Archive File (.deb)
+
+ This Class handles all the operations performed directly on .deb
+ files. It makes use of the AR and TAR classes to give the necessary
+ external interface.
+
+ There are only two things that can be done with a raw package,
+ extract it's control information and extract the contents itself.
+
+ This should probably subclass an as-yet unwritten super class to
+ produce a generic archive mechanism.
+
+ The memory control file extractor is useful to extract a single file
+ into memory from the control.tar.gz
+
+ ##################################################################### */
+ /*}}}*/
+#ifndef PKGLIB_DEBFILE_H
+#define PKGLIB_DEBFILE_H
+
+#include <apt-pkg/arfile.h>
+#include <apt-pkg/dirstream.h>
+#include <apt-pkg/macros.h>
+#include <apt-pkg/tagfile.h>
+
+#include <string>
+
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/md5.h>
+#endif
+#ifndef APT_10_CLEANER_HEADERS
+#include <apt-pkg/pkgcache.h>
+#endif
+
+class FileFd;
+
+class debDebFile
+{
+ protected:
+
+ FileFd &File;
+ ARArchive AR;
+
+ bool CheckMember(const char *Name);
+
+ public:
+ class ControlExtract;
+ class MemControlExtract;
+
+ bool ExtractTarMember(pkgDirStream &Stream, const char *Name);
+ bool ExtractArchive(pkgDirStream &Stream);
+ const ARArchive::Member *GotoMember(const char *Name);
+ inline FileFd &GetFile() {return File;};
+
+ explicit debDebFile(FileFd &File);
+};
+
+class debDebFile::ControlExtract : public pkgDirStream
+{
+ public:
+
+ virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE;
+};
+
+class debDebFile::MemControlExtract : public pkgDirStream
+{
+ bool IsControl;
+
+ public:
+
+ char *Control;
+ pkgTagSection Section;
+ unsigned long Length;
+ std::string Member;
+
+ // Members from DirStream
+ virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE;
+ virtual bool Process(Item &Itm,const unsigned char *Data,
+ unsigned long long Size,unsigned long long Pos) APT_OVERRIDE;
+
+ // Helpers
+ bool Read(debDebFile &Deb);
+ bool TakeControl(const void *Data,unsigned long long Size);
+
+ MemControlExtract() : IsControl(false), Control(0), Length(0), Member("control") {};
+ explicit MemControlExtract(std::string Member) : IsControl(false), Control(0), Length(0), Member(Member) {};
+ ~MemControlExtract() {delete [] Control;};
+};
+ /*}}}*/
+
+#endif
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc
index 25e0a3312..279f35a38 100644
--- a/apt-pkg/deb/debindexfile.cc
+++ b/apt-pkg/deb/debindexfile.cc
@@ -10,7 +10,9 @@
// Include Files /*{{{*/
#include <config.h>
+#include <apti18n.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/debfile.h>
#include <apt-pkg/debindexfile.h>
#include <apt-pkg/deblistparser.h>
#include <apt-pkg/debrecords.h>
@@ -172,36 +174,23 @@ bool debDebPkgFileIndex::GetContent(std::ostream &content, std::string const &de
if (stat(debfile.c_str(), &Buf) != 0)
return false;
- // get the control data out of the deb file via dpkg-deb -I
- std::string dpkg = _config->Find("Dir::Bin::dpkg","dpkg-deb");
- std::vector<const char *> Args;
- Args.push_back(dpkg.c_str());
- Args.push_back("-I");
- Args.push_back(debfile.c_str());
- Args.push_back("control");
- Args.push_back(NULL);
- FileFd PipeFd;
- pid_t Child;
- if(Popen((const char**)&Args[0], PipeFd, Child, FileFd::ReadOnly) == false)
- return _error->Error("Popen failed");
+ FileFd debFd(debfile, FileFd::ReadOnly);
+ debDebFile deb(debFd);
+ debDebFile::MemControlExtract extractor("control");
- std::string line;
- bool first_line_seen = false;
- while (PipeFd.ReadLine(line))
- {
- if (first_line_seen == false)
- {
- if (line.empty())
- continue;
- first_line_seen = true;
- }
- else if (line.empty())
- break;
- content << line << "\n";
- }
+ if (not extractor.Read(deb))
+ return _error->Error(_("Could not read meta data from %s"), debfile.c_str());
+
+ // trim off newlines
+ while (extractor.Control[extractor.Length] == '\n')
+ extractor.Control[extractor.Length--] = '\0';
+ const char *Control = extractor.Control;
+ while (isspace_ascii(Control[0]))
+ Control++;
+
+ content << Control;
content << "Filename: " << debfile << "\n";
content << "Size: " << std::to_string(Buf.st_size) << "\n";
- ExecWait(Child, "Popen");
return true;
}
diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h
index 5c89f9c54..222fed229 100644
--- a/apt-pkg/deb/debindexfile.h
+++ b/apt-pkg/deb/debindexfile.h
@@ -44,7 +44,7 @@ public:
virtual pkgCacheListParser * CreateListParser(FileFd &Pkg) APT_OVERRIDE;
- debStatusIndex(std::string const &File);
+ explicit debStatusIndex(std::string const &File);
virtual ~debStatusIndex();
};
@@ -83,7 +83,7 @@ public:
// Interface for the Cache Generator
virtual bool HasPackages() const APT_OVERRIDE;
- debTranslationsIndex(IndexTarget const &Target);
+ explicit debTranslationsIndex(IndexTarget const &Target);
virtual ~debTranslationsIndex();
};
@@ -141,7 +141,7 @@ public:
// Interface for acquire
- debDebPkgFileIndex(std::string const &DebFile);
+ explicit debDebPkgFileIndex(std::string const &DebFile);
virtual ~debDebPkgFileIndex();
//FIXME: use proper virtual-handling on next ABI break
@@ -162,7 +162,7 @@ public:
virtual pkgSrcRecords::Parser *CreateSrcParser() const APT_OVERRIDE;
virtual bool HasPackages() const APT_OVERRIDE {return false;};
- debDscFileIndex(std::string const &DscFile);
+ explicit debDscFileIndex(std::string const &DscFile);
virtual ~debDscFileIndex();
};
@@ -191,7 +191,7 @@ public:
// Abort if the file does not exist.
virtual bool Exists() const APT_OVERRIDE {return true;};
- debStringPackageIndex(std::string const &content);
+ explicit debStringPackageIndex(std::string const &content);
virtual ~debStringPackageIndex();
};
#endif
diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h
index f02252d58..8143f855f 100644
--- a/apt-pkg/deb/deblistparser.h
+++ b/apt-pkg/deb/deblistparser.h
@@ -121,7 +121,7 @@ class APT_HIDDEN debListParser : public pkgCacheListParser
APT_PUBLIC static const char *ConvertRelation(const char *I,unsigned int &Op);
- debListParser(FileFd *File);
+ explicit debListParser(FileFd *File);
virtual ~debListParser();
};
@@ -145,15 +145,15 @@ class APT_HIDDEN debTranslationsParser : public debListParser
virtual APT::StringView Version() APT_OVERRIDE { return ""; }
#endif
- debTranslationsParser(FileFd *File)
+ explicit debTranslationsParser(FileFd *File)
: debListParser(File) {};
};
class APT_HIDDEN debStatusListParser : public debListParser
{
public:
- virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver);
- debStatusListParser(FileFd *File)
+ virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver) APT_OVERRIDE;
+ explicit debStatusListParser(FileFd *File)
: debListParser(File) {};
};
#endif
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index f88076abf..fef58f543 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -59,7 +59,7 @@ static std::string NormalizeSignedBy(std::string SignedBy, bool const SupportFil
// but fingerprints are harder to fake than the others and this option is set once,
// not interactively all the time so easy to type is not really a concern.
std::transform(SignedBy.begin(), SignedBy.end(), SignedBy.begin(), [](char const c) {
- return (isspace(c) == 0) ? c : ',';
+ return (isspace_ascii(c) == 0) ? c : ',';
});
auto fingers = VectorizeString(SignedBy, ',');
auto const isAnEmptyString = [](std::string const &s) { return s.empty(); };
@@ -109,7 +109,7 @@ class APT_HIDDEN debReleaseIndexPrivate /*{{{*/
std::vector<std::string> SupportedComponents;
std::map<std::string, std::string> const ReleaseOptions;
- debReleaseIndexPrivate(std::map<std::string, std::string> const &Options) : CheckValidUntil(metaIndex::TRI_UNSET), ValidUntilMin(0), ValidUntilMax(0), CheckDate(metaIndex::TRI_UNSET), DateMaxFuture(0), NotBefore(0), ReleaseOptions(Options) {}
+ explicit debReleaseIndexPrivate(std::map<std::string, std::string> const &Options) : CheckValidUntil(metaIndex::TRI_UNSET), ValidUntilMin(0), ValidUntilMax(0), CheckDate(metaIndex::TRI_UNSET), DateMaxFuture(0), NotBefore(0), ReleaseOptions(Options) {}
};
/*}}}*/
// ReleaseIndex::MetaIndex* - display helpers /*{{{*/
@@ -510,9 +510,6 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro
Sum->MetaKeyFilename = Name;
Sum->Size = Size;
Sum->Hashes.FileSize(Size);
- APT_IGNORE_DEPRECATED_PUSH
- Sum->Hash = hs;
- APT_IGNORE_DEPRECATED_POP
Entries[Name] = Sum;
}
Entries[Name]->Hashes.push_back(hs);
diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h
index 7c3b9020c..ea3fc320a 100644
--- a/apt-pkg/deb/debrecords.h
+++ b/apt-pkg/deb/debrecords.h
@@ -85,7 +85,7 @@ class APT_HIDDEN debDebFileRecordParser : public debRecordParserBase
public:
virtual std::string FileName() APT_OVERRIDE;
- debDebFileRecordParser(std::string FileName);
+ explicit debDebFileRecordParser(std::string FileName);
virtual ~debDebFileRecordParser();
};
diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc
index 9656fcac3..0b6cf1ff0 100644
--- a/apt-pkg/deb/debsrcrecords.cc
+++ b/apt-pkg/deb/debsrcrecords.cc
@@ -158,30 +158,7 @@ bool debSrcRecordParser::BuildDepends(std::vector<pkgSrcRecords::Parser::BuildDe
// ---------------------------------------------------------------------
/* This parses the list of files and returns it, each file is required to have
a complete source package */
-bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &F)
-{
- std::vector<pkgSrcRecords::File2> F2;
- if (Files2(F2) == false)
- return false;
- for (std::vector<pkgSrcRecords::File2>::const_iterator f2 = F2.begin(); f2 != F2.end(); ++f2)
- {
- pkgSrcRecords::File2 f;
-#if __GNUC__ >= 4
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
- f.MD5Hash = f2->MD5Hash;
- f.Size = f2->Size;
-#if __GNUC__ >= 4
- #pragma GCC diagnostic pop
-#endif
- f.Path = f2->Path;
- f.Type = f2->Type;
- F.push_back(f);
- }
- return true;
-}
-bool debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2> &List)
+bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &List)
{
List.clear();
@@ -231,7 +208,7 @@ bool debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2> &List)
path = Base + path;
// look if we have a record for this file already
- std::vector<pkgSrcRecords::File2>::iterator file = List.begin();
+ std::vector<pkgSrcRecords::File>::iterator file = List.begin();
for (; file != List.end(); ++file)
if (file->Path == path)
break;
@@ -239,12 +216,6 @@ bool debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2> &List)
// we have it already, store the new hash and be done
if (file != List.end())
{
- if (checksumField == "Files")
- {
- APT_IGNORE_DEPRECATED_PUSH
- file->MD5Hash = hash;
- APT_IGNORE_DEPRECATED_POP
- }
// an error here indicates that we have two different hashes for the same file
if (file->Hashes.push_back(hashString) == false)
return _error->Error("Error parsing checksum in %s of source package %s", checksumField.c_str(), Package().c_str());
@@ -252,18 +223,12 @@ bool debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2> &List)
}
// we haven't seen this file yet
- pkgSrcRecords::File2 F;
+ pkgSrcRecords::File F;
F.Path = path;
F.FileSize = strtoull(size.c_str(), NULL, 10);
F.Hashes.push_back(hashString);
F.Hashes.FileSize(F.FileSize);
- APT_IGNORE_DEPRECATED_PUSH
- F.Size = F.FileSize;
- if (checksumField == "Files")
- F.MD5Hash = hash;
- APT_IGNORE_DEPRECATED_POP
-
// Try to guess what sort of file it is we are getting.
string::size_type Pos = F.Path.length()-1;
while (1)
diff --git a/apt-pkg/deb/debsrcrecords.h b/apt-pkg/deb/debsrcrecords.h
index 45617f641..b572d3427 100644
--- a/apt-pkg/deb/debsrcrecords.h
+++ b/apt-pkg/deb/debsrcrecords.h
@@ -53,7 +53,6 @@ class APT_HIDDEN debSrcRecordParser : public pkgSrcRecords::Parser
return std::string(Start,Stop);
};
virtual bool Files(std::vector<pkgSrcRecords::File> &F) APT_OVERRIDE;
- bool Files2(std::vector<pkgSrcRecords::File2> &F);
debSrcRecordParser(std::string const &File,pkgIndexFile const *Index);
virtual ~debSrcRecordParser();
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index ffa880df2..ad5a9007e 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -301,10 +301,6 @@ bool pkgDPkgPM::Remove(PkgIterator Pkg,bool Purge)
// ---------------------------------------------------------------------
/* This is part of the helper script communication interface, it sends
very complete information down to the other end of the pipe.*/
-bool pkgDPkgPM::SendV2Pkgs(FILE *F)
-{
- return SendPkgsInfo(F, 2);
-}
bool pkgDPkgPM::SendPkgsInfo(FILE * const F, unsigned int const &Version)
{
// This version of APT supports only v3, so don't sent higher versions
@@ -1223,17 +1219,6 @@ void pkgDPkgPM::BuildPackagesProgressMap()
++PackagesTotal;
}
/*}}}*/
-bool pkgDPkgPM::Go(int StatusFd) /*{{{*/
-{
- APT::Progress::PackageManager *progress = NULL;
- if (StatusFd == -1)
- progress = APT::Progress::PackageManagerProgressFactory();
- else
- progress = new APT::Progress::PackageManagerProgressFd(StatusFd);
-
- return Go(progress);
-}
- /*}}}*/
void pkgDPkgPM::StartPtyMagic() /*{{{*/
{
if (_config->FindB("Dpkg::Use-Pty", true) == false)
diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h
index c073b5024..3ba4770e8 100644
--- a/apt-pkg/deb/dpkgpm.h
+++ b/apt-pkg/deb/dpkgpm.h
@@ -93,7 +93,6 @@ class pkgDPkgPM : public pkgPackageManager
// Helpers
bool RunScriptsWithPkgs(const char *Cnf);
- APT_DEPRECATED_MSG("Use SendPkgInfo with the version as parameter instead") bool SendV2Pkgs(FILE *F);
bool SendPkgsInfo(FILE * const F, unsigned int const &Version);
void WriteHistoryTag(std::string const &tag, std::string value);
std::string ExpandShortPackageName(pkgDepCache &Cache,
@@ -127,13 +126,12 @@ class pkgDPkgPM : public pkgPackageManager
virtual bool Remove(PkgIterator Pkg,bool Purge = false) APT_OVERRIDE;
virtual bool Go(APT::Progress::PackageManager *progress) APT_OVERRIDE;
- APT_DEPRECATED_MSG("Use overload with explicit progress manager") virtual bool Go(int StatusFd=-1) APT_OVERRIDE;
virtual void Reset() APT_OVERRIDE;
public:
- pkgDPkgPM(pkgDepCache *Cache);
+ explicit pkgDPkgPM(pkgDepCache *Cache);
virtual ~pkgDPkgPM();
APT_HIDDEN static bool ExpandPendingCalls(std::vector<Item> &List, pkgDepCache &Cache);