+ if (ArchOnly && (I == 1 || I == 3))
+ continue;
+
+ if (Sect.Find(fields[I], Start, Stop) == false)
+ continue;
+
+ while (1)
+ {
+ Start = debListParser::ParseDepends(Start, Stop,
+ rec.Package,rec.Version,rec.Op,true);
+
+ if (Start == 0)
+ return _error->Error("Problem parsing dependency: %s", fields[I]);
+ rec.Type = I;
+
+ if (rec.Package != "")
+ BuildDeps.push_back(rec);
+
+ if (Start == Stop)
+ break;
+ }
+ }
+
+ return true;
+}
+ /*}}}*/
+// SrcRecordParser::Files - Return a list of files for this source /*{{{*/
+// ---------------------------------------------------------------------
+/* This parses the list of files and returns it, each file is required to have
+ a complete source package */
+bool debSrcRecordParser::Files(vector<pkgSrcRecords::File> &List)
+{
+ List.erase(List.begin(),List.end());
+
+ string Files = Sect.FindS("Files");
+ if (Files.empty() == true)
+ return false;
+
+ // Stash the / terminated directory prefix
+ string Base = Sect.FindS("Directory");
+ if (Base.empty() == false && Base[Base.length()-1] != '/')
+ Base += '/';
+
+ // Iterate over the entire list grabbing each triplet
+ const char *C = Files.c_str();
+ while (*C != 0)
+ {
+ pkgSrcRecords::File F;
+ string Size;
+
+ // Parse each of the elements
+ if (ParseQuoteWord(C,F.MD5Hash) == false ||
+ ParseQuoteWord(C,Size) == false ||
+ ParseQuoteWord(C,F.Path) == false)
+ return _error->Error("Error parsing file record");