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/edspindexfile.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apt-pkg/edsp/edspindexfile.cc') diff --git a/apt-pkg/edsp/edspindexfile.cc b/apt-pkg/edsp/edspindexfile.cc index 5a9d5aacd..366325d0f 100644 --- a/apt-pkg/edsp/edspindexfile.cc +++ b/apt-pkg/edsp/edspindexfile.cc @@ -28,7 +28,11 @@ edspIndex::edspIndex(string File) : debStatusIndex(File) // StatusIndex::Merge - Load the index file into a cache /*{{{*/ bool edspIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const { - FileFd Pkg(File,FileFd::ReadOnlyGzip); + FileFd Pkg; + if (File != "stdin") + Pkg.Open(File, FileFd::ReadOnly); + else + Pkg.OpenDescriptor(STDIN_FILENO, FileFd::ReadOnly); if (_error->PendingError() == true) return false; edspListParser Parser(&Pkg); -- cgit v1.2.3