diff options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/contrib/configuration.cc | 5 | ||||
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 21 | ||||
-rw-r--r-- | apt-pkg/init.h | 2 | ||||
-rw-r--r-- | apt-pkg/makefile | 2 |
4 files changed, 17 insertions, 13 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 4b2c0fbb5..09e454be9 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -374,10 +374,9 @@ void Configuration::Clear(string Name, string Value) void Configuration::Clear(string Name) { Item *Top = Lookup(Name.c_str(),false); - if (Top == 0) { - cout << "config item: " << Name << " not found" << endl; + if (Top == 0) return; - } + Top->Value = string(); Item *Stop = Top; Top = Top->Child; 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++; diff --git a/apt-pkg/init.h b/apt-pkg/init.h index 74ac3a7ca..e21351797 100644 --- a/apt-pkg/init.h +++ b/apt-pkg/init.h @@ -18,7 +18,7 @@ // See the makefile #define APT_PKG_MAJOR 3 -#define APT_PKG_MINOR 5 +#define APT_PKG_MINOR 10 #define APT_PKG_RELEASE 0 extern const char *pkgVersion; diff --git a/apt-pkg/makefile b/apt-pkg/makefile index 5f48f0f52..8de7d945e 100644 --- a/apt-pkg/makefile +++ b/apt-pkg/makefile @@ -13,7 +13,7 @@ include ../buildlib/defaults.mak # methods/makefile - FIXME LIBRARY=apt-pkg LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER) -MAJOR=3.9 +MAJOR=3.10 MINOR=0 SLIBS=$(PTHREADLIB) $(INTLLIBS) APT_DOMAIN:=libapt-pkg$(MAJOR) |