From f7dec19f5ce3b876c5d2eaeb2d26cf513780c935 Mon Sep 17 00:00:00 2001 From: Daniel Burrows Date: Thu, 25 Sep 2008 18:24:09 -0700 Subject: Restore the apt ABI. The problem was that the size of pkgDpkgPM and its member offsets changed because a map giving the names of the trigger states was inserted into the middle of the structure. I fixed it by using a statically allocated array instead. This changes the procedure for looking up a string to a linear search, which should be fine (or even faster than before) since there are only 4 state strings. If it becomes a problem, sorting the array by key will allow us to use std::equal_range(), but I would advise against this unless it's really necessary, since sooner or later someone will forget to maintain the sort order. --- apt-pkg/deb/dpkgpm.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'apt-pkg/deb/dpkgpm.h') diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index 449469126..ebc7e32bf 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -47,8 +47,6 @@ class pkgDPkgPM : public pkgPackageManager // the int is the state that is already done (e.g. a package that is // going to be install is already in state "half-installed") map PackageOpsDone; - // map the dpkg "processing" info to human readable names - map PackageProcessingOps; // progress reporting unsigned int PackagesDone; unsigned int PackagesTotal; -- cgit v1.2.3