summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/fileutl.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-04-22 15:19:17 +0200
committerMichael Vogt <mvo@debian.org>2014-04-22 15:19:17 +0200
commit9607aab538b07f1bb60f9b0d84ea445589638998 (patch)
treebdd459aac462fc0dc93b7a0eb319dc218ecc16e4 /apt-pkg/contrib/fileutl.cc
parentc6e00b107318e32284437f02285197154bee59bf (diff)
parentebe24b7ad56550f21f467b86ceab7f7209a876f6 (diff)
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
Diffstat (limited to 'apt-pkg/contrib/fileutl.cc')
-rw-r--r--apt-pkg/contrib/fileutl.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index c9d419fc4..de73a7fd8 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -1360,7 +1360,10 @@ bool FileFd::OpenInternDescriptor(unsigned int const Mode, APT::Configuration::C
Args.push_back(a->c_str());
if (Comp == false && FileName.empty() == false)
{
- Args.push_back("--stdout");
+ // commands not needing arguments, do not need to be told about using standard output
+ // in reality, only testcases with tools like cat, rev, rot13, … are able to trigger this
+ if (compressor.CompressArgs.empty() == false && compressor.UncompressArgs.empty() == false)
+ Args.push_back("--stdout");
if (TemporaryFileName.empty() == false)
Args.push_back(TemporaryFileName.c_str());
else
@@ -1653,6 +1656,8 @@ bool FileFd::Write(int Fd, const void *From, unsigned long long Size)
/* */
bool FileFd::Seek(unsigned long long To)
{
+ Flags &= ~HitEof;
+
if (d != NULL && (d->pipe == true || d->InternalStream() == true))
{
// Our poor man seeking in pipes is costly, so try to avoid it