diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-04-22 17:59:09 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-04-22 21:58:26 +0200 |
commit | feab34c5216941ca95aae1a389238a77b662d1de (patch) | |
tree | 3aee2587ca28cfa62421d076d40d81060a0579c4 /apt-pkg/deb | |
parent | 5572f6bdcb947e11f32e2a035438d9d3899ad46d (diff) |
add support for apt-get build-dep foo.dsc
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r-- | apt-pkg/deb/debsrcrecords.cc | 19 | ||||
-rw-r--r-- | apt-pkg/deb/debsrcrecords.h | 7 |
2 files changed, 26 insertions, 0 deletions
diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc index b09588dd3..fc748c40f 100644 --- a/apt-pkg/deb/debsrcrecords.cc +++ b/apt-pkg/deb/debsrcrecords.cc @@ -18,6 +18,7 @@ #include <apt-pkg/aptconfiguration.h> #include <apt-pkg/srcrecords.h> #include <apt-pkg/tagfile.h> +#include <apt-pkg/gpgv.h> #include <ctype.h> #include <stdlib.h> @@ -189,3 +190,21 @@ debSrcRecordParser::~debSrcRecordParser() delete[] Buffer; } /*}}}*/ + + +debDscRecordParser::debDscRecordParser(std::string const &DscFile) + : debSrcRecordParser(DscFile, NULL) +{ + // support clear signed files + if (OpenMaybeClearSignedFile(DscFile, Fd) == false) + { + _error->Error("Failed to open %s", DscFile.c_str()); + return; + } + + // re-init to ensure the updated Fd is used + Tags.Init(&Fd); + // read the first (and only) record + Step(); + +} diff --git a/apt-pkg/deb/debsrcrecords.h b/apt-pkg/deb/debsrcrecords.h index b65d1480b..0cd664818 100644 --- a/apt-pkg/deb/debsrcrecords.h +++ b/apt-pkg/deb/debsrcrecords.h @@ -26,6 +26,7 @@ class debSrcRecordParser : public pkgSrcRecords::Parser /** \brief dpointer placeholder (for later in case we need it) */ void *d; + protected: FileFd Fd; pkgTagFile Tags; pkgTagSection Sect; @@ -60,4 +61,10 @@ class debSrcRecordParser : public pkgSrcRecords::Parser virtual ~debSrcRecordParser(); }; +class debDscRecordParser : public debSrcRecordParser +{ + public: + debDscRecordParser(std::string const &DscFile); +}; + #endif |