X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b2e465d6d32d2dc884f58b94acb7e35f671a87fe..73da43e90be945d3be9b4f3b6e5016fb7bacb59d:/test/testextract.cc diff --git a/test/testextract.cc b/test/testextract.cc index 41a197068..b790df618 100644 --- a/test/testextract.cc +++ b/test/testextract.cc @@ -1,4 +1,3 @@ -#define APT_COMPATIBILITY 1 #include #include #include @@ -11,6 +10,8 @@ #include #include +using namespace std; + bool Go(int argc,char *argv[]) { // Init the database @@ -70,9 +71,12 @@ bool Go(int argc,char *argv[]) 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) @@ -83,7 +87,8 @@ bool Go(int argc,char *argv[]) int main(int argc,char *argv[]) { - pkgInitialize(*_config); + pkgInitConfig(*_config); + pkgInitSystem(*_config,_system); _config->Set("Dir::State::status","/tmp/testing/status"); Go(argc,argv);