Sync
[ntk/apt.git] / test / scratch.cc
CommitLineData
024835dc
AL
1#include <apt-pkg/acquire-item.h>
2#include <apt-pkg/init.h>
3#include <apt-pkg/error.h>
0a8a80e5 4#include <signal.h>
024835dc
AL
5
6int main()
7{
0a8a80e5
AL
8 signal(SIGPIPE,SIG_IGN);
9
024835dc
AL
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 }
0a8a80e5
AL
23
24 Fetcher.Run();
024835dc
AL
25
26 _error->DumpErrors();
27}