From ccd8e28fe16bf8e80db65e330ed89454c0104f80 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 17 Jun 2009 10:44:21 +0200 Subject: send "dpkg-exec" message on the status fd when dpkg is run --- apt-pkg/deb/dpkgpm.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 462f4a739..a8d08f500 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -839,6 +839,15 @@ bool pkgDPkgPM::Go(int OutStatusFd) // Fork dpkg pid_t Child; _config->Set("APT::Keep-Fds::",fd[1]); + // send status information that we are about to fork dpkg + if(OutStatusFd > 0) { + ostringstream status; + status << "pmstatus:dpkg-exec:" + << (PackagesDone/float(PackagesTotal)*100.0) + << ":" << _("Running dpkg") + << endl; + write(OutStatusFd, status.str().c_str(), status.str().size()); + } Child = ExecFork(); // This is the child -- cgit v1.2.3