]> git.saurik.com Git - apt.git/commitdiff
rename APT::Progress::Packagemanager Started->Start, Finished->Stop to match pkgAcqui...
authorMichael Vogt <mvo@debian.org>
Mon, 14 Oct 2013 05:52:21 +0000 (07:52 +0200)
committerMichael Vogt <mvo@debian.org>
Mon, 14 Oct 2013 05:52:21 +0000 (07:52 +0200)
apt-pkg/deb/dpkgpm.cc
apt-pkg/iprogress.cc
apt-pkg/iprogress.h

index d617a3c0c314b805b248c0fb0fa479d7209751f6..36d8c829aa0b58e023b258522c85e8d3aaf2a743 100644 (file)
@@ -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) 
       {
index 7d1cc6341b0dcd80b59a2a66b2a0e02a005bba6a..7de190da080defbd27a8c4a42a91e4ce0eea02db 100644 (file)
@@ -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)
    {
index 5584b39404bf8e7863827b3190a2f654c987072d..ccf1542793f866759d1d9235b926bf7bb0e295a8 100644 (file)
@@ -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,