summaryrefslogtreecommitdiff
path: root/test/scratch.cc
blob: a8817bc4116ad55202bf1b234788569f9ef6cf67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/init.h>
#include <apt-pkg/error.h>
#include <signal.h>

int main()
{
   signal(SIGPIPE,SIG_IGN);
   
   pkgInitialize(*_config);
   
   pkgSourceList List;
   pkgAcquire Fetcher;
   List.ReadMainList();
   
   pkgSourceList::const_iterator I;
   for (I = List.begin(); I != List.end(); I++)
   {
      new pkgAcqIndex(&Fetcher,I);
      if (_error->PendingError() == true)
	 break;
   }

   Fetcher.Run();
   
   _error->DumpErrors();
}