Przeglądaj źródła

* fix in the pkgRecords destructor
* Bump ABI version

Michael Vogt 19 lat temu
rodzic
commit
d715b9c969
8 zmienionych plików z 47 dodań i 37 usunięć
  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
 // See the makefile
 #define APT_PKG_MAJOR 3
 #define APT_PKG_MAJOR 3
-#define APT_PKG_MINOR 52
+#define APT_PKG_MINOR 53
 #define APT_PKG_RELEASE 0
 #define APT_PKG_RELEASE 0
     
     
 extern const char *pkgVersion;
 extern const char *pkgVersion;

+ 1 - 1
apt-pkg/makefile

@@ -13,7 +13,7 @@ include ../buildlib/defaults.mak
 # methods/makefile - FIXME
 # methods/makefile - FIXME
 LIBRARY=apt-pkg
 LIBRARY=apt-pkg
 LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER)
 LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER)
-MAJOR=3.52
+MAJOR=3.53
 MINOR=0
 MINOR=0
 SLIBS=$(PTHREADLIB) $(INTLLIBS)
 SLIBS=$(PTHREADLIB) $(INTLLIBS)
 APT_DOMAIN:=libapt-pkg$(MAJOR)
 APT_DOMAIN:=libapt-pkg$(MAJOR)

+ 9 - 7
apt-pkg/pkgrecords.cc

@@ -23,11 +23,9 @@
 // Records::pkgRecords - Constructor					/*{{{*/
 // Records::pkgRecords - Constructor					/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* This will create the necessary structures to access the status files */
 /* 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(); 
    for (pkgCache::PkgFileIterator I = Cache.FileBegin(); 
 	I.end() == false; I++)
 	I.end() == false; I++)
    {
    {
@@ -49,9 +47,13 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache), Files(0)
 /* */
 /* */
 pkgRecords::~pkgRecords()
 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		/*{{{*/
 // 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/pkgcache.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
+#include <vector>
 
 
 class pkgRecords
 class pkgRecords
 {
 {
@@ -32,8 +33,8 @@ class pkgRecords
    private:
    private:
    
    
    pkgCache &Cache;
    pkgCache &Cache;
-   Parser **Files;
-      
+   std::vector<Parser *>Files;
+
    public:
    public:
 
 
    // Lookup function
    // 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)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 
 dnl -- SET THIS TO THE RELEASE VERSION --
 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"
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(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
 apt (0.6.46.4ubuntu7) feisty; urgency=low
 
 
   * Merged the apt--mirror branch. This means that a new 'mirror' 
   * 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
 BIN := $(BIN)/methods
 
 
 # FIXME..
 # FIXME..
-LIB_APT_PKG_MAJOR = 3.52
+LIB_APT_PKG_MAJOR = 3.53
 APT_DOMAIN := libapt-pkg$(LIB_APT_PKG_MAJOR)
 APT_DOMAIN := libapt-pkg$(LIB_APT_PKG_MAJOR)
 
 
 # The file method
 # The file method

+ 24 - 24
po/apt-all.pot

@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \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"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\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"
 "  -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-extracttemplates.cc:267 apt-pkg/pkgcachegen.cc:819
+#: cmdline/apt-extracttemplates.cc:267 apt-pkg/pkgcachegen.cc:820
 #, c-format
 #, c-format
 msgid "Unable to write to %s"
 msgid "Unable to write to %s"
 msgstr ""
 msgstr ""
@@ -1397,9 +1397,9 @@ msgid "The info and temp directories need to be on the same filesystem"
 msgstr ""
 msgstr ""
 
 
 #. Build the status cache
 #. 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"
 msgid "Reading package lists"
 msgstr ""
 msgstr ""
 
 
@@ -2337,92 +2337,92 @@ msgstr ""
 msgid "Cache has an incompatible versioning system"
 msgid "Cache has an incompatible versioning system"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:119
+#: apt-pkg/pkgcachegen.cc:120
 #, c-format
 #, c-format
 msgid "Error occurred while processing %s (NewPackage)"
 msgid "Error occurred while processing %s (NewPackage)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:134
+#: apt-pkg/pkgcachegen.cc:135
 #, c-format
 #, c-format
 msgid "Error occurred while processing %s (UsePackage1)"
 msgid "Error occurred while processing %s (UsePackage1)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:157
+#: apt-pkg/pkgcachegen.cc:158
 #, c-format
 #, c-format
 msgid "Error occured while processing %s (NewFileDesc1)"
 msgid "Error occured while processing %s (NewFileDesc1)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:182
+#: apt-pkg/pkgcachegen.cc:183
 #, c-format
 #, c-format
 msgid "Error occurred while processing %s (UsePackage2)"
 msgid "Error occurred while processing %s (UsePackage2)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:186
+#: apt-pkg/pkgcachegen.cc:187
 #, c-format
 #, c-format
 msgid "Error occurred while processing %s (NewFileVer1)"
 msgid "Error occurred while processing %s (NewFileVer1)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:217
+#: apt-pkg/pkgcachegen.cc:218
 #, c-format
 #, c-format
 msgid "Error occurred while processing %s (NewVersion1)"
 msgid "Error occurred while processing %s (NewVersion1)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:221
+#: apt-pkg/pkgcachegen.cc:222
 #, c-format
 #, c-format
 msgid "Error occurred while processing %s (UsePackage3)"
 msgid "Error occurred while processing %s (UsePackage3)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:225
+#: apt-pkg/pkgcachegen.cc:226
 #, c-format
 #, c-format
 msgid "Error occurred while processing %s (NewVersion2)"
 msgid "Error occurred while processing %s (NewVersion2)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:249
+#: apt-pkg/pkgcachegen.cc:250
 #, c-format
 #, c-format
 msgid "Error occured while processing %s (NewFileDesc2)"
 msgid "Error occured while processing %s (NewFileDesc2)"
 msgstr ""
 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."
 msgid "Wow, you exceeded the number of package names this APT is capable of."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:258
+#: apt-pkg/pkgcachegen.cc:259
 msgid "Wow, you exceeded the number of versions this APT is capable of."
 msgid "Wow, you exceeded the number of versions this APT is capable of."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:261
+#: apt-pkg/pkgcachegen.cc:262
 msgid "Wow, you exceeded the number of descriptions this APT is capable of."
 msgid "Wow, you exceeded the number of descriptions this APT is capable of."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:264
+#: apt-pkg/pkgcachegen.cc:265
 msgid "Wow, you exceeded the number of dependencies this APT is capable of."
 msgid "Wow, you exceeded the number of dependencies this APT is capable of."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:292
+#: apt-pkg/pkgcachegen.cc:293
 #, c-format
 #, c-format
 msgid "Error occurred while processing %s (FindPkg)"
 msgid "Error occurred while processing %s (FindPkg)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:305
+#: apt-pkg/pkgcachegen.cc:306
 #, c-format
 #, c-format
 msgid "Error occurred while processing %s (CollectFileProvides)"
 msgid "Error occurred while processing %s (CollectFileProvides)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:311
+#: apt-pkg/pkgcachegen.cc:312
 #, c-format
 #, c-format
 msgid "Package %s %s was not found while processing file dependencies"
 msgid "Package %s %s was not found while processing file dependencies"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:682
+#: apt-pkg/pkgcachegen.cc:683
 #, c-format
 #, c-format
 msgid "Couldn't stat source package list %s"
 msgid "Couldn't stat source package list %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:767
+#: apt-pkg/pkgcachegen.cc:768
 msgid "Collecting File Provides"
 msgid "Collecting File Provides"
 msgstr ""
 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"
 msgid "IO Error saving source cache"
 msgstr ""
 msgstr ""