scratch.cc 418 B

1234567891011121314151617181920212223
  1. #include <apt-pkg/acquire-item.h>
  2. #include <apt-pkg/init.h>
  3. #include <apt-pkg/error.h>
  4. int main()
  5. {
  6. pkgInitialize(*_config);
  7. pkgSourceList List;
  8. pkgAcquire Fetcher;
  9. List.ReadMainList();
  10. pkgSourceList::const_iterator I;
  11. for (I = List.begin(); I != List.end(); I++)
  12. {
  13. new pkgAcqIndex(&Fetcher,I);
  14. if (_error->PendingError() == true)
  15. break;
  16. }
  17. _error->DumpErrors();
  18. }