瀏覽代碼

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

Michael Vogt 20 年之前
父節點
當前提交
2c4eaffff4
共有 3 個文件被更改,包括 6 次插入3 次删除
  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
    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)
 {
    unsigned long Res = 0;
    for (; Text != End && *Text != ':' && *Text != 0; Text++)
-      Res = (unsigned long)(*Text) ^ (Res << 2);
+      Res = ((unsigned long)(*Text) & 0xDF) ^ (Res << 1);
    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)
 
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.45")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.45.1")
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$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
   * share/archive-archive.gpg:
     - 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)
   
  --