+debSrcRecordParser::debSrcRecordParser(std::string const &File,pkgIndexFile const *Index)
+ : Parser(Index), d(NULL), Tags(&Fd), iOffset(0), Buffer(NULL)
+{
+ if (File.empty() == false)
+ {
+ if (Fd.Open(File, FileFd::ReadOnly, FileFd::Extension))
+ Tags.Init(&Fd, 102400);
+ }
+}
+std::string debSrcRecordParser::Package() const /*{{{*/
+{
+ auto const name = Sect.FindS("Package");
+ if (iIndex == nullptr)
+ return name.empty() ? Sect.FindS("Source") : name;
+ else
+ return name;
+}
+ /*}}}*/