Sfoglia il codice sorgente

* apt-pkg/tagfile.cc:
- applied patch from jvw to make the tag key stuff case-insensitive

Michael Vogt 20 anni fa
parent
commit
2c4eaffff4
3 ha cambiato i file con 6 aggiunte e 3 eliminazioni
  1. 2 2
      apt-pkg/tagfile.cc
  2. 1 1
      configure.in
  3. 3 0
      debian/changelog

+ 2 - 2
apt-pkg/tagfile.cc

@@ -192,12 +192,12 @@ bool pkgTagFile::Jump(pkgTagSection &Tag,unsigned long Offset)
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* This looks for the first double new line in the data stream. It also
 /* This looks for the first double new line in the data stream. It also
    indexes the tags in the section. This very simple hash function for the
    indexes the tags in the section. This very simple hash function for the
-   first 3 letters gives very good performance on the debian package files */
+   last 8 letters gives very good performance on the debian package files */
 inline static unsigned long AlphaHash(const char *Text, const char *End = 0)
 inline static unsigned long AlphaHash(const char *Text, const char *End = 0)
 {
 {
    unsigned long Res = 0;
    unsigned long Res = 0;
    for (; Text != End && *Text != ':' && *Text != 0; Text++)
    for (; Text != End && *Text != ':' && *Text != 0; Text++)
-      Res = (unsigned long)(*Text) ^ (Res << 2);
+      Res = ((unsigned long)(*Text) & 0xDF) ^ (Res << 1);
    return Res & 0xFF;
    return Res & 0xFF;
 }
 }
 
 

+ 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.45")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.45.1")
 PACKAGE="apt"
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)
 AC_SUBST(PACKAGE)

+ 3 - 0
debian/changelog

@@ -22,6 +22,9 @@ apt (0.6.45.1) unstable; urgency=low
     * fi.po: Updated to 512t. Closes: #382702
     * fi.po: Updated to 512t. Closes: #382702
   * share/archive-archive.gpg:
   * share/archive-archive.gpg:
     - removed the outdated amd64 and debian-2004 keys
     - removed the outdated amd64 and debian-2004 keys
+  * apt-pkg/tagfile.cc:
+    - applied patch from Jeroen van Wolffelaar to make the tags
+      caseinsensitive (closes: #384182)
   
   
  -- 
  --