From d715b9c969264eec96913b577f63a3e9e498b2e6 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 21 Feb 2007 09:59:53 +0100 Subject: * fix in the pkgRecords destructor * Bump ABI version --- apt-pkg/init.h | 2 +- apt-pkg/makefile | 2 +- apt-pkg/pkgrecords.cc | 16 +++++++++------- apt-pkg/pkgrecords.h | 5 +++-- configure.in | 2 +- debian/changelog | 7 +++++++ methods/makefile | 2 +- po/apt-all.pot | 48 ++++++++++++++++++++++++------------------------ 8 files changed, 47 insertions(+), 37 deletions(-) diff --git a/apt-pkg/init.h b/apt-pkg/init.h index 0e91f164d..905173a7a 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 52 +#define APT_PKG_MINOR 53 #define APT_PKG_RELEASE 0 extern const char *pkgVersion; diff --git a/apt-pkg/makefile b/apt-pkg/makefile index 10b012774..d36747d85 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.52 +MAJOR=3.53 MINOR=0 SLIBS=$(PTHREADLIB) $(INTLLIBS) APT_DOMAIN:=libapt-pkg$(MAJOR) diff --git a/apt-pkg/pkgrecords.cc b/apt-pkg/pkgrecords.cc index b22f3e73f..456b5aef4 100644 --- a/apt-pkg/pkgrecords.cc +++ b/apt-pkg/pkgrecords.cc @@ -23,11 +23,9 @@ // Records::pkgRecords - Constructor /*{{{*/ // --------------------------------------------------------------------- /* This will create the necessary structures to access the status files */ -pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(0) +pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), + Files(Cache.HeaderP->PackageFileCount) { - Files = new Parser *[Cache.HeaderP->PackageFileCount]; - memset(Files,0,sizeof(*Files)*Cache.HeaderP->PackageFileCount); - for (pkgCache::PkgFileIterator I = Cache.FileBegin(); I.end() == false; I++) { @@ -49,9 +47,13 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(0) /* */ pkgRecords::~pkgRecords() { - for (unsigned I = 0; I != Cache.HeaderP->PackageFileCount; I++) - delete Files[I]; - delete [] Files; + for ( vector::iterator it = Files.begin(); + it != Files.end(); + ++it) + { + delete *it; + } + } /*}}}*/ // Records::Lookup - Get a parser for the package version file /*{{{*/ diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h index 31c444dbf..ad3946c1b 100644 --- a/apt-pkg/pkgrecords.h +++ b/apt-pkg/pkgrecords.h @@ -23,6 +23,7 @@ #include #include +#include class pkgRecords { @@ -32,8 +33,8 @@ class pkgRecords private: pkgCache &Cache; - Parser **Files; - + std::vectorFiles; + public: // Lookup function diff --git a/configure.in b/configure.in index ce166b31e..7d93de955 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.46.4ubuntu7") +AC_DEFINE_UNQUOTED(VERSION,"0.6.46.4ubuntu8") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/changelog b/debian/changelog index caed5e531..b926a495f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +apt (0.6.46.4ubuntu8) feisty; urgency=low + + * fix in the pkgRecords destructor + * Bump ABI version + + -- + apt (0.6.46.4ubuntu7) feisty; urgency=low * Merged the apt--mirror branch. This means that a new 'mirror' diff --git a/methods/makefile b/methods/makefile index d66ba11e3..610bd5b49 100644 --- a/methods/makefile +++ b/methods/makefile @@ -7,7 +7,7 @@ include ../buildlib/defaults.mak BIN := $(BIN)/methods # FIXME.. -LIB_APT_PKG_MAJOR = 3.52 +LIB_APT_PKG_MAJOR = 3.53 APT_DOMAIN := libapt-pkg$(LIB_APT_PKG_MAJOR) # The file method diff --git a/po/apt-all.pot b/po/apt-all.pot index f2f151dd3..7233cd617 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-02-06 11:14+0100\n" +"POT-Creation-Date: 2007-02-09 16:54+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -251,7 +251,7 @@ msgid "" " -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n" msgstr "" -#: cmdline/apt-extracttemplates.cc:267 apt-pkg/pkgcachegen.cc:819 +#: cmdline/apt-extracttemplates.cc:267 apt-pkg/pkgcachegen.cc:820 #, c-format msgid "Unable to write to %s" msgstr "" @@ -1397,9 +1397,9 @@ msgid "The info and temp directories need to be on the same filesystem" msgstr "" #. Build the status cache -#: apt-inst/deb/dpkgdb.cc:139 apt-pkg/pkgcachegen.cc:752 -#: apt-pkg/pkgcachegen.cc:821 apt-pkg/pkgcachegen.cc:826 -#: apt-pkg/pkgcachegen.cc:949 +#: apt-inst/deb/dpkgdb.cc:139 apt-pkg/pkgcachegen.cc:753 +#: apt-pkg/pkgcachegen.cc:822 apt-pkg/pkgcachegen.cc:827 +#: apt-pkg/pkgcachegen.cc:950 msgid "Reading package lists" msgstr "" @@ -2337,92 +2337,92 @@ msgstr "" msgid "Cache has an incompatible versioning system" msgstr "" -#: apt-pkg/pkgcachegen.cc:119 +#: apt-pkg/pkgcachegen.cc:120 #, c-format msgid "Error occurred while processing %s (NewPackage)" msgstr "" -#: apt-pkg/pkgcachegen.cc:134 +#: apt-pkg/pkgcachegen.cc:135 #, c-format msgid "Error occurred while processing %s (UsePackage1)" msgstr "" -#: apt-pkg/pkgcachegen.cc:157 +#: apt-pkg/pkgcachegen.cc:158 #, c-format msgid "Error occured while processing %s (NewFileDesc1)" msgstr "" -#: apt-pkg/pkgcachegen.cc:182 +#: apt-pkg/pkgcachegen.cc:183 #, c-format msgid "Error occurred while processing %s (UsePackage2)" msgstr "" -#: apt-pkg/pkgcachegen.cc:186 +#: apt-pkg/pkgcachegen.cc:187 #, c-format msgid "Error occurred while processing %s (NewFileVer1)" msgstr "" -#: apt-pkg/pkgcachegen.cc:217 +#: apt-pkg/pkgcachegen.cc:218 #, c-format msgid "Error occurred while processing %s (NewVersion1)" msgstr "" -#: apt-pkg/pkgcachegen.cc:221 +#: apt-pkg/pkgcachegen.cc:222 #, c-format msgid "Error occurred while processing %s (UsePackage3)" msgstr "" -#: apt-pkg/pkgcachegen.cc:225 +#: apt-pkg/pkgcachegen.cc:226 #, c-format msgid "Error occurred while processing %s (NewVersion2)" msgstr "" -#: apt-pkg/pkgcachegen.cc:249 +#: apt-pkg/pkgcachegen.cc:250 #, c-format msgid "Error occured while processing %s (NewFileDesc2)" msgstr "" -#: apt-pkg/pkgcachegen.cc:255 +#: apt-pkg/pkgcachegen.cc:256 msgid "Wow, you exceeded the number of package names this APT is capable of." msgstr "" -#: apt-pkg/pkgcachegen.cc:258 +#: apt-pkg/pkgcachegen.cc:259 msgid "Wow, you exceeded the number of versions this APT is capable of." msgstr "" -#: apt-pkg/pkgcachegen.cc:261 +#: apt-pkg/pkgcachegen.cc:262 msgid "Wow, you exceeded the number of descriptions this APT is capable of." msgstr "" -#: apt-pkg/pkgcachegen.cc:264 +#: apt-pkg/pkgcachegen.cc:265 msgid "Wow, you exceeded the number of dependencies this APT is capable of." msgstr "" -#: apt-pkg/pkgcachegen.cc:292 +#: apt-pkg/pkgcachegen.cc:293 #, c-format msgid "Error occurred while processing %s (FindPkg)" msgstr "" -#: apt-pkg/pkgcachegen.cc:305 +#: apt-pkg/pkgcachegen.cc:306 #, c-format msgid "Error occurred while processing %s (CollectFileProvides)" msgstr "" -#: apt-pkg/pkgcachegen.cc:311 +#: apt-pkg/pkgcachegen.cc:312 #, c-format msgid "Package %s %s was not found while processing file dependencies" msgstr "" -#: apt-pkg/pkgcachegen.cc:682 +#: apt-pkg/pkgcachegen.cc:683 #, c-format msgid "Couldn't stat source package list %s" msgstr "" -#: apt-pkg/pkgcachegen.cc:767 +#: apt-pkg/pkgcachegen.cc:768 msgid "Collecting File Provides" msgstr "" -#: apt-pkg/pkgcachegen.cc:894 apt-pkg/pkgcachegen.cc:901 +#: apt-pkg/pkgcachegen.cc:895 apt-pkg/pkgcachegen.cc:902 msgid "IO Error saving source cache" msgstr "" -- cgit v1.2.3