Package: apt-xapian-index
Version: 0.44
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: origin-ubuntu quantal ubuntu-patch
*** /tmp/tmpF0NRN8/bug_body
In Ubuntu, the attached patch was applied to achieve the following:
* add XPM term that contains a mangled version of the pkgname where
all "-" are replaced with "_" to workaround that the queryparser
considers "-" a special char
Thanks for considering the patch.
-- System Information:
Debian Release: wheezy/sid
APT prefers precise-updates
APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500,
'precise-proposed'), (500, 'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-27-generic (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru apt-xapian-index-0.44ubuntu6/debian/changelog apt-xapian-index-0.44ubuntu7/debian/changelog
diff -Nru apt-xapian-index-0.44ubuntu6/debian/patches/02_axi-pkgname-mangled-term.patch apt-xapian-index-0.44ubuntu7/debian/patches/02_axi-pkgname-mangled-term.patch
--- apt-xapian-index-0.44ubuntu6/debian/patches/02_axi-pkgname-mangled-term.patch 1970-01-01 01:00:00.000000000 +0100
+++ apt-xapian-index-0.44ubuntu7/debian/patches/02_axi-pkgname-mangled-term.patch 2012-08-17 13:35:01.000000000 +0200
@@ -0,0 +1,15 @@
+diff --git a/axi/indexer.py b/axi/indexer.py
+index bd8bf95..084b13a 100644
+--- a/axi/indexer.py
++++ b/axi/indexer.py
+@@ -531,6 +531,10 @@ class Indexer(object):
+ # Index the package name with a special prefix, to be able to find this
+ # document by exact package name match
+ document.add_term("XP"+pkg.name)
++ # the query parser is very unhappy about "-" in the pkgname, this
++ # breaks e.g. FLAG_WILDCARD based matching, so we add a mangled
++ # name here
++ document.add_term("XPM"+pkg.name.replace("-","_"))
+ # Have all the various plugins index their things
+ for addon in self.plugins:
+ addon.obj.index(document, pkg)
diff -Nru apt-xapian-index-0.44ubuntu6/debian/patches/series apt-xapian-index-0.44ubuntu7/debian/patches/series
--- apt-xapian-index-0.44ubuntu6/debian/patches/series 2011-09-21 13:27:03.000000000 +0200
+++ apt-xapian-index-0.44ubuntu7/debian/patches/series 2012-08-17 13:35:27.000000000 +0200
@@ -1 +1,2 @@
01_axi_cjk_support.patch
+02_axi-pkgname-mangled-term.patch
\ No newline at end of file