diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-03-31 11:47:01 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-03-31 11:47:01 +0200 |
commit | 41ceaf02483a826d5797cf0bd61bd7b6013733a8 (patch) | |
tree | ad640516dcb0066b0c93a7c639e3967290066a95 /apt-pkg/edsp/edspsystem.cc | |
parent | e3674d91d27a7290d2b01e14eb2540e10be9d883 (diff) |
add a special scenario filename for using stdin
Diffstat (limited to 'apt-pkg/edsp/edspsystem.cc')
-rw-r--r-- | apt-pkg/edsp/edspsystem.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apt-pkg/edsp/edspsystem.cc b/apt-pkg/edsp/edspsystem.cc index 579ffc656..c8e417b1d 100644 --- a/apt-pkg/edsp/edspsystem.cc +++ b/apt-pkg/edsp/edspsystem.cc @@ -86,8 +86,10 @@ bool edspSystem::ArchiveSupported(const char *Type) // System::Score - Determine if we should use the edsp system /*{{{*/ signed edspSystem::Score(Configuration const &Cnf) { + if (Cnf.Find("Dir::State::universe", "") == "stdin") + return 1000; if (FileExists(Cnf.FindFile("Dir::State::universe","")) == true) - return 1000; + return 1000; return -1000; } /*}}}*/ @@ -95,7 +97,12 @@ signed edspSystem::Score(Configuration const &Cnf) bool edspSystem::AddStatusFiles(vector<pkgIndexFile *> &List) { if (StatusFile == 0) - StatusFile = new edspIndex(_config->FindFile("Dir::State::universe")); + { + if (_config->Find("Dir::State::universe", "") == "stdin") + StatusFile = new edspIndex("stdin"); + else + StatusFile = new edspIndex(_config->FindFile("Dir::State::universe")); + } List.push_back(StatusFile); return true; } |