From 41ceaf02483a826d5797cf0bd61bd7b6013733a8 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 31 Mar 2011 11:47:01 +0200 Subject: add a special scenario filename for using stdin --- apt-pkg/edsp/edspsystem.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'apt-pkg/edsp/edspsystem.cc') 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 &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; } -- cgit v1.2.3