- pkgSourceList::const_iterator I = List.begin();
-
- // Count how many items we will need
- unsigned int Count = 0;
- for (; I != List.end(); I++)
- if (I->Type == pkgSourceList::Item::DebSrc)
- Count++;
-
- // Doesnt work without any source index files
- if (Count == 0)
- {
- _error->Error("Sorry, you must put some 'source' uris"
- " in your sources.list");
- return;
- }
-
- Files = new Parser *[Count+1];
- memset(Files,0,sizeof(*Files)*(Count+1));
-
- // Create the parser objects
- Count = 0;
- string Dir = _config->FindDir("Dir::State::lists");
- for (I = List.begin(); I != List.end(); I++)