X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/6d38011bb93451dd9da3294614d821c77ac91687..2a49601f69e08f06fb2727d869d420daacdd09d5:/apt-pkg/edsp/edspsystem.cc diff --git a/apt-pkg/edsp/edspsystem.cc b/apt-pkg/edsp/edspsystem.cc index 579ffc656..aae969d9d 100644 --- a/apt-pkg/edsp/edspsystem.cc +++ b/apt-pkg/edsp/edspsystem.cc @@ -2,24 +2,27 @@ // Description /*{{{*/ /* ###################################################################### - This system provides the abstraction to use the universe file as the + This system provides the abstraction to use the scenario file as the only source of package information to be able to feed the created file back to APT for its own consumption (eat your own dogfood). ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include + #include #include #include #include #include #include -#include #include #include #include #include + +#include /*}}}*/ edspSystem edspSys; @@ -86,16 +89,23 @@ bool edspSystem::ArchiveSupported(const char *Type) // System::Score - Determine if we should use the edsp system /*{{{*/ signed edspSystem::Score(Configuration const &Cnf) { - if (FileExists(Cnf.FindFile("Dir::State::universe","")) == true) - return 1000; + if (Cnf.Find("edsp::scenario", "") == "stdin") + return 1000; + if (RealFileExists(Cnf.FindFile("edsp::scenario","")) == true) + return 1000; return -1000; } /*}}}*/ // System::AddStatusFiles - Register the status files /*{{{*/ -bool edspSystem::AddStatusFiles(vector &List) +bool edspSystem::AddStatusFiles(std::vector &List) { if (StatusFile == 0) - StatusFile = new edspIndex(_config->FindFile("Dir::State::universe")); + { + if (_config->Find("edsp::scenario", "") == "stdin") + StatusFile = new edspIndex("stdin"); + else + StatusFile = new edspIndex(_config->FindFile("edsp::scenario")); + } List.push_back(StatusFile); return true; }