-#define APT_COMPATIBILITY 1
#include <apt-pkg/dpkgdb.h>
#include <apt-pkg/debfile.h>
#include <apt-pkg/error.h>
#include <stdio.h>
#include <stdlib.h>
+using namespace std;
+
bool Go(int argc,char *argv[])
{
// Init the database
Itm.Type = pkgDirStream::Item::Directory;
int Fd;
- if (Extract.DoItem(Itm,Fd) == false)
+ if (Extract.DoItem(Itm,Fd) == false) {
+ fclose(F);
return false;
- }
+ }
+ }
+ fclose(F);
}
else
if (Deb.ExtractArchive(Extract) == false)
int main(int argc,char *argv[])
{
- pkgInitialize(*_config);
+ pkgInitConfig(*_config);
+ pkgInitSystem(*_config,_system);
_config->Set("Dir::State::status","/tmp/testing/status");
Go(argc,argv);