summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-10-14 07:52:21 +0200
committerMichael Vogt <mvo@debian.org>2013-10-14 07:52:21 +0200
commita22fdebf63a42026e4350ebd069512c797bc2a5b (patch)
treedcffe6ff5850eb1e22fb392d012e8f2acbad027a /apt-pkg
parentf9935b1c33203b9e47ca0ff5cb441c7963b19fbc (diff)
rename APT::Progress::Packagemanager Started->Start, Finished->Stop to match pkgAcquireStatus
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/dpkgpm.cc10
-rw-r--r--apt-pkg/iprogress.cc8
-rw-r--r--apt-pkg/iprogress.h13
3 files changed, 14 insertions, 17 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index d617a3c0c..36d8c829a 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1264,11 +1264,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
_error->DumpErrors(std::cerr);
_error->RevertToStack();
- // Fork dpkg
- pid_t Child;
- d->progress->Started();
-
- Child = ExecFork();
+ // Tell the progress that its starting and fork dpkg
+ d->progress->Start();
+ pid_t Child = ExecFork();
// This is the child
if (Child == 0)
{
@@ -1398,7 +1396,7 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
signal(SIGHUP,old_SIGHUP);
// tell the progress
- d->progress->Finished();
+ d->progress->Stop();
if(master >= 0)
{
diff --git a/apt-pkg/iprogress.cc b/apt-pkg/iprogress.cc
index 7d1cc6341..7de190da0 100644
--- a/apt-pkg/iprogress.cc
+++ b/apt-pkg/iprogress.cc
@@ -40,7 +40,7 @@ void PackageManagerProgressFd::WriteToStatusFd(std::string s)
FileFd::Write(OutStatusFd, s.c_str(), s.size());
}
-void PackageManagerProgressFd::Started()
+void PackageManagerProgressFd::Start()
{
_config->Set("APT::Keep-Fds::", OutStatusFd);
@@ -53,7 +53,7 @@ void PackageManagerProgressFd::Started()
WriteToStatusFd(status.str());
}
-void PackageManagerProgressFd::Finished()
+void PackageManagerProgressFd::Stop()
{
// clear the Keep-Fd again
_config->Clear("APT::Keep-Fds", OutStatusFd);
@@ -134,13 +134,13 @@ PackageManagerFancy::PackageManagerFancy()
}
}
-void PackageManagerFancy::Started()
+void PackageManagerFancy::Start()
{
if (nr_terminal_rows > 0)
SetupTerminalScrollArea(nr_terminal_rows);
}
-void PackageManagerFancy::Finished()
+void PackageManagerFancy::Stop()
{
if (nr_terminal_rows > 0)
{
diff --git a/apt-pkg/iprogress.h b/apt-pkg/iprogress.h
index 5584b3940..ccf154279 100644
--- a/apt-pkg/iprogress.h
+++ b/apt-pkg/iprogress.h
@@ -24,8 +24,8 @@ namespace Progress {
: percentage(0.0), last_reported_progress(0) {};
virtual ~PackageManager() {};
- virtual void Started() {};
- virtual void Finished() {};
+ virtual void Start() {};
+ virtual void Stop() {};
virtual pid_t fork() {return fork(); };
@@ -59,9 +59,8 @@ namespace Progress {
public:
PackageManagerProgressFd(int progress_fd);
- // FIXME: rename to Start/Stop to match the pkgAcquireStatus
- virtual void Started();
- virtual void Finished();
+ virtual void Start();
+ virtual void Stop();
virtual bool StatusChanged(std::string PackageName,
unsigned int StepsDone,
@@ -86,8 +85,8 @@ namespace Progress {
public:
PackageManagerFancy();
- virtual void Started();
- virtual void Finished();
+ virtual void Start();
+ virtual void Stop();
virtual bool StatusChanged(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,