fix apt output ordering and update test to match the new human friendly messages...
authorMichael Vogt <mvo@debian.org>
Mon, 21 Oct 2013 19:24:32 +0000 (21:24 +0200)
committerMichael Vogt <mvo@debian.org>
Mon, 21 Oct 2013 19:24:32 +0000 (21:24 +0200)
apt-pkg/deb/dpkgpm.cc
test/integration/test-apt-progress-fd

index 5f1849b..a61f08d 100644 (file)
@@ -668,14 +668,15 @@ void pkgDPkgPM::ProcessDpkgStatusLine(char *line)
       // check if the package moved to the next dpkg state
       if(next_action && (action == next_action))
       {
-         // we moved from one dpkg state to a new one, report that
-         PackageOpsDone[pkg]++;
-         PackagesDone++;
-
          // only read the translation if there is actually a next
          // action
          const char *translation = _(states[PackageOpsDone[pkg]].str);
          std::string msg;
+
+         // we moved from one dpkg state to a new one, report that
+         PackageOpsDone[pkg]++;
+         PackagesDone++;
+
          strprintf(msg, translation, i18n_pkgname.c_str());
          d->progress->StatusChanged(pkgname, PackagesDone, PackagesTotal, msg);
          
@@ -1505,7 +1506,6 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
    CloseLog();
 
    // dpkg is done at this point
-   d->progress->StatusChanged("", PackagesDone, PackagesTotal, "");
    d->progress->Stop();
 
    if (pkgPackageManager::SigINTStop)
index 97bb258..9d250e9 100755 (executable)
@@ -21,7 +21,7 @@ pmstatus:dpkg-exec:0:Running dpkg
 pmstatus:testing:0:Installing testing (amd64)
 pmstatus:testing:20:Preparing testing (amd64)
 pmstatus:testing:40:Unpacking testing (amd64)
-pmstatus:testing:60:Preparing to configure testing
+pmstatus:testing:60:Preparing to configure testing (amd64)
 pmstatus:dpkg-exec:60:Running dpkg
 pmstatus:testing:60:Configuring testing (amd64)
 pmstatus:testing:80:Configuring testing (amd64)
@@ -35,7 +35,7 @@ dlstatus:1:0:Retrieving file 1 of 1
 pmstatus:dpkg-exec:0:Running dpkg
 pmstatus:testing:20:Preparing testing (amd64)
 pmstatus:testing:40:Unpacking testing (amd64)
-pmstatus:testing:60:Preparing to configure testing
+pmstatus:testing:60:Preparing to configure testing (amd64)
 pmstatus:dpkg-exec:60:Running dpkg
 pmstatus:testing:60:Configuring testing (amd64)
 pmstatus:testing:80:Configuring testing (amd64)