Просмотр исходного кода

* fix in the pkgRecords destructor
* Bump ABI version

Michael Vogt лет назад: 19
Родитель
Сommit
d715b9c969
8 измененных файлов с 47 добавлено и 37 удалено
  1. 1 1
      apt-pkg/init.h
  2. 1 1
      apt-pkg/makefile
  3. 9 7
      apt-pkg/pkgrecords.cc
  4. 3 2
      apt-pkg/pkgrecords.h
  5. 1 1
      configure.in
  6. 7 0
      debian/changelog
  7. 1 1
      methods/makefile
  8. 24 24
      po/apt-all.pot

+ 1 - 1
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;

+ 1 - 1
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)

+ 9 - 7
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<Parser*>::iterator it = Files.begin();
+     it != Files.end();
+     ++it)
+   {
+      delete *it;
+   }
+
 }
 									/*}}}*/
 // Records::Lookup - Get a parser for the package version file		/*{{{*/

+ 3 - 2
apt-pkg/pkgrecords.h

@@ -23,6 +23,7 @@
 
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/fileutl.h>
+#include <vector>
 
 class pkgRecords
 {
@@ -32,8 +33,8 @@ class pkgRecords
    private:
    
    pkgCache &Cache;
-   Parser **Files;
-      
+   std::vector<Parser *>Files;
+
    public:
 
    // Lookup function

+ 1 - 1
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)

+ 7 - 0
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' 

+ 1 - 1
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

+ 24 - 24
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 <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\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 ""