summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp/edspsystem.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-05-28 15:40:59 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-06-27 11:57:12 +0200
commitf74d99c6a78caafdc6e32d8cb135683b7154795c (patch)
tree3056bcf8fa40dd70c65ae073e634aa142ab8e628 /apt-pkg/edsp/edspsystem.cc
parentdae197476f1831269d13f4e990276ce25c483842 (diff)
eipp: provide the internal planer as an external one
Testing the current implementation can benefit from being able to be feed an EIPP request and produce a fully compliant response. It is also a great test for EIPP in general.
Diffstat (limited to 'apt-pkg/edsp/edspsystem.cc')
-rw-r--r--apt-pkg/edsp/edspsystem.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/apt-pkg/edsp/edspsystem.cc b/apt-pkg/edsp/edspsystem.cc
index 2a78efe58..b0e7b8a21 100644
--- a/apt-pkg/edsp/edspsystem.cc
+++ b/apt-pkg/edsp/edspsystem.cc
@@ -35,6 +35,9 @@ edspLikeSystem::edspLikeSystem(char const * const Label) : pkgSystem(Label, &deb
edspSystem::edspSystem() : edspLikeSystem("Debian APT solver interface")
{
}
+eippSystem::eippSystem() : edspLikeSystem("Debian APT planer interface")
+{
+}
/*}}}*/
// System::Lock - Get the lock /*{{{*/
bool edspLikeSystem::Lock()
@@ -134,6 +137,19 @@ bool edspSystem::AddStatusFiles(std::vector<pkgIndexFile *> &List) /*{{{*/
return true;
}
/*}}}*/
+bool eippSystem::AddStatusFiles(std::vector<pkgIndexFile *> &List) /*{{{*/
+{
+ if (StatusFile == nullptr)
+ {
+ if (_config->Find("eipp::scenario", "") == "/nonexistent/stdin")
+ StatusFile.reset(new eippIndex("/nonexistent/stdin"));
+ else
+ StatusFile.reset(new eippIndex(_config->FindFile("eipp::scenario")));
+ }
+ List.push_back(StatusFile.get());
+ return true;
+}
+ /*}}}*/
edspLikeSystem::~edspLikeSystem() {}
edspSystem::~edspSystem()
@@ -145,5 +161,7 @@ edspSystem::~edspSystem()
RemoveFile("~edspSystem", tempPrefsFile);
rmdir(tempDir.c_str());
}
+eippSystem::~eippSystem() {}
APT_HIDDEN edspSystem edspSys;
+APT_HIDDEN eippSystem eippSys;