scratch.cc 489 B

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