summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-09-10 18:46:05 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-09-14 15:22:18 +0200
commit7f58427b9584686f80cd5eccfdd02c1ace75518a (patch)
treef6ff664b84dc92a77f3ae6480a2e9c781060929d
parent8597ee543a7d1d61450542c61512295f9da4fec4 (diff)
use a less generic special trigger filename for stdin
Git-Dch: Ignore
-rw-r--r--apt-pkg/edsp/edspindexfile.cc2
-rw-r--r--apt-pkg/edsp/edspsystem.cc4
-rw-r--r--apt-pkg/indexfile.cc8
-rw-r--r--cmdline/apt-internal-solver.cc2
4 files changed, 10 insertions, 6 deletions
diff --git a/apt-pkg/edsp/edspindexfile.cc b/apt-pkg/edsp/edspindexfile.cc
index 409117c5e..4e0f9c26a 100644
--- a/apt-pkg/edsp/edspindexfile.cc
+++ b/apt-pkg/edsp/edspindexfile.cc
@@ -47,7 +47,7 @@ uint8_t edspIndex::GetIndexFlags() const
}
bool edspIndex::OpenListFile(FileFd &Pkg, std::string const &FileName)
{
- if (FileName.empty() == false && FileName != "stdin")
+ if (FileName.empty() == false && FileName != "/nonexistent/stdin")
return pkgDebianIndexRealFile::OpenListFile(Pkg, FileName);
if (Pkg.OpenDescriptor(STDIN_FILENO, FileFd::ReadOnly) == false)
return _error->Error("Problem opening %s",FileName.c_str());
diff --git a/apt-pkg/edsp/edspsystem.cc b/apt-pkg/edsp/edspsystem.cc
index c52d537f3..4c16f76d2 100644
--- a/apt-pkg/edsp/edspsystem.cc
+++ b/apt-pkg/edsp/edspsystem.cc
@@ -131,8 +131,8 @@ bool edspSystem::AddStatusFiles(std::vector<pkgIndexFile *> &List) /*{{{*/
{
if (StatusFile == 0)
{
- if (_config->Find("edsp::scenario", "") == "stdin")
- StatusFile = new edspIndex("stdin");
+ if (_config->Find("edsp::scenario", "") == "/nonexistent/stdin")
+ StatusFile = new edspIndex("/nonexistent/stdin");
else
StatusFile = new edspIndex(_config->FindFile("edsp::scenario"));
}
diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc
index db57faf07..c3c0e74ae 100644
--- a/apt-pkg/indexfile.cc
+++ b/apt-pkg/indexfile.cc
@@ -267,9 +267,13 @@ std::string pkgDebianIndexTargetFile::GetProgressDescription() const
return Target.Description;
}
-pkgDebianIndexRealFile::pkgDebianIndexRealFile(std::string const &File, bool const Trusted) :/*{{{*/
- pkgDebianIndexFile(Trusted), d(NULL), File(flAbsPath(File))
+pkgDebianIndexRealFile::pkgDebianIndexRealFile(std::string const &pFile, bool const Trusted) :/*{{{*/
+ pkgDebianIndexFile(Trusted), d(NULL)
{
+ if (pFile == "/nonexistent/stdin")
+ File = pFile;
+ else
+ File = flAbsPath(pFile);
}
/*}}}*/
// IndexRealFile::Size - Return the size of the index /*{{{*/
diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc
index af301dbcd..258b42ccb 100644
--- a/cmdline/apt-internal-solver.cc
+++ b/cmdline/apt-internal-solver.cc
@@ -111,7 +111,7 @@ int main(int argc,const char *argv[]) /*{{{*/
_config->Set("APT::System", "Debian APT solver interface");
_config->Set("APT::Solver", "internal");
- _config->Set("edsp::scenario", "stdin");
+ _config->Set("edsp::scenario", "/nonexistent/stdin");
int input = STDIN_FILENO;
FILE* output = stdout;
SetNonBlock(input, false);