diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2005-08-05 12:04:22 +0000 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2005-08-05 12:04:22 +0000 |
commit | dfa11ecc05d342af77f86120c123a3ea618544b6 (patch) | |
tree | 531eecd6bf4ec1157bd61dddc882ec911a459c29 /apt-pkg/deb | |
parent | f77bf408f3f7ae650bac2a967f28610737acf1ab (diff) |
* merged the fixes from apt--progress-reporting
Patches applied:
* michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-23
* remvoed a debug string
* michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-24
* soname changed, fixed a bug in the parsing code when dpkg send the same state more than once (at the end)
* michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-25
* merged with apt@packages.debian.org/apt--main--0, added changelog entry for the 0.6.40.1 upload
* michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-26
* fix a bug when out-of-order states are send from dpkg
* michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-27
* changelog update
* michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-28
* a real changelog entry now
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 2e85fc14e..79a8c312b 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -357,27 +357,27 @@ bool pkgDPkgPM::Go(int OutStatusFd) { {"half-installed", _("Preparing %s")}, {"unpacked", _("Unpacking %s") }, - NULL + {NULL, NULL} }, // Configure operation { {"unpacked",_("Preparing to configure %s") }, {"half-configured", _("Configuring %s") }, { "installed", _("Installed %s")}, - NULL + {NULL, NULL} }, // Remove operation { {"half-configured", _("Preparing for removal of %s")}, {"half-installed", _("Removing %s")}, {"config-files", _("Removed %s")}, - NULL + {NULL, NULL} }, // Purge operation { {"config-files", _("Preparing for remove with config %s")}, {"not-installed", _("Removed with config %s")}, - NULL + {NULL, NULL} }, }; @@ -627,13 +627,18 @@ bool pkgDPkgPM::Go(int OutStatusFd) char *pkg = list[1]; char *action = list[2]; vector<struct DpkgState> &states = PackageOps[pkg]; - const char *next_action = states[PackageOpsDone[pkg]].state; - const char *translation = states[PackageOpsDone[pkg]].str; - char s[200]; - snprintf(s, sizeof(s), translation, pkg); + const char *next_action = NULL; + if(PackageOpsDone[pkg] < states.size()) + next_action = states[PackageOpsDone[pkg]].state; // check if the package moved to the next dpkg state if(next_action && (strcmp(action, next_action) == 0)) { + // only read the translation if there is actually a next + // action + const char *translation = states[PackageOpsDone[pkg]].str; + char s[200]; + snprintf(s, sizeof(s), translation, pkg); + // we moved from one dpkg state to a new one, report that PackageOpsDone[pkg]++; Done++; |