summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-06-17 10:44:21 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-06-17 10:44:21 +0200
commitccd8e28fe16bf8e80db65e330ed89454c0104f80 (patch)
tree299485e413baa3988d9cb22b85f94a9d5a401851
parentcebe0287c36408e44196266de45737386eaa28fc (diff)
send "dpkg-exec" message on the status fd when dpkg is run
-rw-r--r--apt-pkg/deb/dpkgpm.cc9
-rw-r--r--debian/changelog1
2 files changed, 10 insertions, 0 deletions
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
diff --git a/debian/changelog b/debian/changelog
index a22f78401..60db448c0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,7 @@ apt (0.7.21) UNRELEASED; urgency=low
* apt-pkg/deb/dpkgpm.cc:
- add Dpkg::UseIoNice boolean option to run dpkg with ionice -c3
(off by default)
+ - send "dpkg-exec" message on the status fd when dpkg is run
-- Michael Vogt <michael.vogt@ubuntu.com> Thu, 28 May 2009 17:51:42 +0200