-#include <apt-pkg/acquire-item.h>
-#include <apt-pkg/init.h>
-#include <apt-pkg/error.h>
+#include <apt-pkg/tagfile.h>
+
#include <signal.h>
+#include <stdio.h>
-int main()
+int main(int argc,char *argv[])
{
- signal(SIGPIPE,SIG_IGN);
-
- pkgInitialize(*_config);
+ FileFd F(argv[1],FileFd::ReadOnly);
+ pkgTagFile Reader(F);
- pkgSourceList List;
- pkgAcquire Fetcher;
- List.ReadMainList();
-
- pkgSourceList::const_iterator I;
- for (I = List.begin(); I != List.end(); I++)
+ pkgTagSection Sect;
+ while (Reader.Step(Sect) == true)
{
- new pkgAcqIndex(&Fetcher,I);
- if (_error->PendingError() == true)
- break;
- }
-
- Fetcher.Run();
+ Sect.FindS("Package");
+ Sect.FindS("Section");
+ Sect.FindS("Version");
+ Sect.FindI("Size");
+ };
- _error->DumpErrors();
+ return 0;
}