summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r--apt-pkg/acquire.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 757fab057..2bc2287a1 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -1247,13 +1247,9 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner)
snprintf(msg,sizeof(msg), _("Retrieving file %li of %li"), i, TotalItems);
// build the status str
- status << "dlstatus:" << i
- << ":" << std::setprecision(3) << Percent
- << ":" << msg
- << endl;
-
- std::string const dlstatus = status.str();
- FileFd::Write(fd, dlstatus.c_str(), dlstatus.size());
+ std::string dlstatus;
+ strprintf(dlstatus, "dlstatus:%ld:%.4f:%s\n", i, Percent, msg);
+ FileFd::Write(fd, dlstatus.data(), dlstatus.size());
}
return true;