From bc80031f74e4acfca5b8ca7188b12ee885a713bd Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 29 Jun 2005 11:43:32 +0000 Subject: [PATCH] * fix a bug when readStateFile is called with no OpProgress object --- apt-pkg/depcache.cc | 15 +++++++++------ configure.in | 2 +- debian/changelog | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 05512e17..36668738 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -112,8 +112,9 @@ bool pkgDepCache::readStateFile(OpProgress *Prog) if(FileExists(state)) { state_file.Open(state, FileFd::ReadOnly); int file_size = state_file.Size(); - Prog->OverallProgress(0, file_size, 1, - _("Reading state information")); + if(Prog != NULL) + Prog->OverallProgress(0, file_size, 1, + _("Reading state information")); pkgTagFile tagfile(&state_file); pkgTagSection section; @@ -131,11 +132,13 @@ bool pkgDepCache::readStateFile(OpProgress *Prog) std::cout << "Install-Reason for: " << pkgname << " is " << reason << std::endl; amt+=section.size(); - Prog->OverallProgress(amt, file_size, 1, - _("Reading state information")); + if(Prog != NULL) + Prog->OverallProgress(amt, file_size, 1, + _("Reading state information")); } - Prog->OverallProgress(file_size, file_size, 1, - _("Reading state information")); + if(Prog != NULL) + Prog->OverallProgress(file_size, file_size, 1, + _("Reading state information")); } } diff --git a/configure.in b/configure.in index f78ce1d1..2cbbd4b5 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.6.38ubuntu1mvo1") +AC_DEFINE_UNQUOTED(VERSION,"0.6.39ubuntu1mvo1") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index 86dca75b..a18f18f1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,7 +10,7 @@ apt (0.6.39ubuntu1mvo1) unstable; urgency=low only timeout once per sources.list line - support for automatic removal of unused dependencies added - -- + -- Michael Vogt Wed, 29 Jun 2005 13:01:36 +0200 apt (0.6.39) unstable; urgency=low -- 2.20.1