diff -Nru apt-xapian-index-0.37/axi/indexer.py apt-xapian-index-0.38/axi/indexer.py
--- apt-xapian-index-0.37/axi/indexer.py 2010-05-13 13:49:46.000000000 +0100
+++ apt-xapian-index-0.38/axi/indexer.py 2010-06-21 12:14:59.000000000 +0100
@@ -459,7 +459,7 @@
self.progress.verbose("Most recent update for: %s." % time.ctime(cur_timestamp))
# See if we need an update
- if self.ds_timestamp <= cur_timestamp:
+ if int(self.ds_timestamp+.5) <= int(cur_timestamp+0.5):
if force:
self.progress.notice("The index %s is up to date, but rebuilding anyway as requested." % axi.XAPIANDBPATH)
else:
diff -Nru apt-xapian-index-0.37/axi-cache apt-xapian-index-0.38/axi-cache
--- apt-xapian-index-0.37/axi-cache 2010-05-24 17:31:50.000000000 +0100
+++ apt-xapian-index-0.38/axi-cache 2010-06-21 13:41:15.000000000 +0100
@@ -31,7 +31,7 @@
import os, os.path
import axi
-VERSION="0.37"
+VERSION="0.38"
# Setup configuration
DEBTAGS_VOCABULARY = "/var/lib/debtags/vocabulary"
diff -Nru apt-xapian-index-0.37/debian/changelog apt-xapian-index-0.38/debian/changelog
--- apt-xapian-index-0.37/debian/changelog 2010-05-24 17:31:39.000000000 +0100
+++ apt-xapian-index-0.38/debian/changelog 2010-06-21 13:40:43.000000000 +0100
@@ -1,3 +1,21 @@
+apt-xapian-index (0.38) unstable; urgency=low
+
+ [ Martin Pitt ]
+ * plugins/apttags.py, AptTags.info(): If the Dir::Cache::pkgcache file does
+ not exist (such as in our test suite, or simply if the system disables
+ it), do not crash but return timestamp == 0, as per documentation.
+ (LP: #267330)
+ * plugins/descriptions.py, indexDeb822(): Fix KeyError on "Description" when
+ running in a non-English locale. Instead, look for a translated key and
+ index that one.
+ * axi/indexer.py, setupIndexing(): Round timestamps when comparing them.
+ This fixes the test suite failing on almost-but-not-quite-identical
+ timestamps.
+ * debian/rules: Run the test suite during build. Add the necessary python
+ libs (-debian, -xapian, -apt, and -nose) as build dependencies.
+
+ -- Enrico Zini <
[email protected]> Mon, 21 Jun 2010 13:39:11 +0100
+
apt-xapian-index (0.37) unstable; urgency=low
* Move #DEBHELPER# at the beginning of postinst, otherwise
diff -Nru apt-xapian-index-0.37/debian/control apt-xapian-index-0.38/debian/control
--- apt-xapian-index-0.37/debian/control 2010-05-13 13:51:46.000000000 +0100
+++ apt-xapian-index-0.38/debian/control 2010-06-21 13:37:38.000000000 +0100
@@ -5,7 +5,11 @@
Uploaders: David Paleino <
[email protected]>
Build-Depends: debhelper (>= 7.0.50~)
Build-Depends-Indep: help2man, python, python-support,
- bash-completion (>= 1:1.0-1~)
+ bash-completion (>= 1:1.0-1~),
+ python-xapian (>= 1.0.2),
+ python-apt (>= 0.7.93.2),
+ python-debian (>= 0.1.14),
+ python-nose
Standards-Version: 3.8.4.0
Vcs-Git:
git://git.debian.org/git/collab-maint/a ... -index.git Vcs-Browser:
http://git.debian.org/?p=collab-maint/a ... -index.gitdiff -Nru apt-xapian-index-0.37/debian/rules apt-xapian-index-0.38/debian/rules
--- apt-xapian-index-0.37/debian/rules 2010-05-13 13:41:46.000000000 +0100
+++ apt-xapian-index-0.38/debian/rules 2010-06-21 13:37:38.000000000 +0100
@@ -11,6 +11,10 @@
dh_auto_build
help2man --section=8 --no-info ./update-apt-xapian-index > update-apt-xapian-index.8
COLUMNS=200 help2man --section=1 --no-info ./axi-cache > axi-cache.1
+ifeq (, $(findstring nocheck, $(DEB_BUILD_OPTIONS)))
+ # run test suite
+ ./runtests -v
+endif
override_dh_auto_install:
dh_auto_install
@@ -31,6 +35,7 @@
override_dh_auto_clean:
dh_auto_clean
find . -name "*.pyc" -delete
+ rm -rf testdb
rm -f update-apt-xapian-index.8 axi-cache.1
vercheck:
diff -Nru apt-xapian-index-0.37/plugins/apttags.py apt-xapian-index-0.38/plugins/apttags.py
--- apt-xapian-index-0.37/plugins/apttags.py 2010-05-12 13:34:19.000000000 +0100
+++ apt-xapian-index-0.38/plugins/apttags.py 2010-06-21 12:14:59.000000000 +0100
@@ -26,6 +26,8 @@
self.re_expand = re.compile(r"\b([^{]+)\{([^}]+)\}")
self.re_split = re.compile(r"\s*,\s*")
file = apt_pkg.config.find_file("Dir::Cache::pkgcache")
+ if not os.path.exists(file):
+ return dict(timestamp = 0)
return dict(timestamp = os.path.getmtime(file))
def init(self, info, progress):
diff -Nru apt-xapian-index-0.37/plugins/descriptions.py apt-xapian-index-0.38/plugins/descriptions.py
--- apt-xapian-index-0.37/plugins/descriptions.py 2010-05-12 13:34:25.000000000 +0100
+++ apt-xapian-index-0.38/plugins/descriptions.py 2010-06-21 12:14:59.000000000 +0100
@@ -103,7 +103,15 @@
# Index the record
self.indexer.index_text_without_positions(pkg["Package"])
- self.indexer.index_text_without_positions(pkg["Description"])
+
+ if 'Description' in pkg:
+ self.indexer.index_text_without_positions(pkg["Description"])
+ else:
+ # check if we have a translated description
+ for k in pkg.keys():
+ if k.startswith('Description-'):
+ self.indexer.index_text_without_positions(pkg[k])
+ break
def init(**kw):
"""
diff -Nru apt-xapian-index-0.37/update-apt-xapian-index apt-xapian-index-0.38/update-apt-xapian-index
--- apt-xapian-index-0.37/update-apt-xapian-index 2010-05-24 17:31:45.000000000 +0100
+++ apt-xapian-index-0.38/update-apt-xapian-index 2010-06-21 13:41:09.000000000 +0100
@@ -31,7 +31,7 @@
import sys
import warnings
-VERSION="0.37"
+VERSION="0.38"
class Parser(OptionParser):
def __init__(self, *args, **kwargs):