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