#endif
#include <string>
+#include <iostream>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/depcache.h>
pkgRecords *Recs);
// Do the installation
- OrderResult DoInstall() {
- if(DoInstallPreFork() == Failed)
- return Failed;
-
- return DoInstallPostFork();
- }
+ OrderResult DoInstall(int statusFd=-1);
// stuff that needs to be done before the fork() of a library that
// uses apt
bool goResult = Go(statusFd);
if(goResult == false)
return Failed;
-
+
// if all was fine update the state file
- if(Res == Completed)
+ if(Res == Completed) {
Cache.writeStateFile(NULL);
-
+ }
return Res;
};