+public:
+ edspSystemPrivate() {}
+
+ void Initialize(Configuration &Cnf)
+ {
+ DeInitialize();
+ Cnf.Set("Dir::State::extended_states", "/dev/null");
+ Cnf.Set("Dir::Etc::preferences", "/dev/null");
+ std::string const tmp = GetTempDir();
+ char tmpname[100];
+ snprintf(tmpname, sizeof(tmpname), "%s/apt-edsp-solver-XXXXXX", tmp.c_str());
+ if (NULL == mkdtemp(tmpname))
+ return;
+ tempDir = tmpname;
+ tempStatesFile = flCombine(tempDir, "extended_states");
+ Cnf.Set("Dir::State::extended_states", tempStatesFile);
+ tempPrefsFile = flCombine(tempDir, "apt_preferences");
+ Cnf.Set("Dir::Etc::preferences", tempPrefsFile);
+ }