+ char *I;
+ for (I = Buffer; *I != 0 && *I != '#'; I++);
+ *I = 0;
+
+ const char *C = _strstrip(Buffer);
+
+ // Comment or blank
+ if (C[0] == '#' || C[0] == 0)
+ continue;
+
+ // Grok it
+ string LineType;
+ if (ParseQuoteWord(C,LineType) == false)
+ return _error->Error(_("Malformed line %u in source list %s (type)"),CurLine,File.c_str());
+
+ Type *Parse = Type::GetType(LineType.c_str());
+ if (Parse == 0)
+ return _error->Error(_("Type '%s' is not known in on line %u in source list %s"),LineType.c_str(),CurLine,File.c_str());
+
+ // Authenticated repository
+ Vendor const *Vndr = 0;
+ if (C[0] == '[')
+ {
+ string VendorID;
+
+ if (ParseQuoteWord(C,VendorID) == false)
+ return _error->Error(_("Malformed line %u in source list %s (vendor id)"),CurLine,File.c_str());
+
+ if (VendorID.length() < 2 || VendorID.end()[-1] != ']')
+ return _error->Error(_("Malformed line %u in source list %s (vendor id)"),CurLine,File.c_str());
+ VendorID = string(VendorID,1,VendorID.size()-2);
+
+ for (vector<Vendor const *>::const_iterator iter = VendorList.begin();
+ iter != VendorList.end(); iter++)
+ {
+ if ((*iter)->VendorID == VendorID)
+ {
+ Vndr = *iter;
+ break;
+ }
+ }
+
+ if (Vndr == 0)
+ return _error->Error(_("Unknown vendor ID '%s' in line %u of source list %s"),
+ VendorID.c_str(),CurLine,File.c_str());
+ }
+
+ if (Parse->ParseLine(SrcList,Vndr,C,CurLine,File) == false)
+ return false;
+ }
+ return true;