Package: apt-xapian-index Version: 0.41 Severity: wishlist Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu natty ubuntu-patch
In Ubuntu, we've applied the attached patch to achieve the following: * Merge from debian unstable. Remaining changes: - when upgrading, ensure the index is fully rebuild (in the background) to ensure that we get updated information in /var/lib/apt-xapian-index/{index.values} and that the index fully utilizes the new plugins (LP: #646018) - use ionice for the index building We thought you might be interested in doing the same. This is only needed on upgrade and until the weekly cron job kicks in. But because 0.39 adds the new catalogued time plugin its useful to rebuild so that the data is available. Its not strictly needed though as the client can also just read the values file and skip using cataloguedtime if its missing there. Cheers, Michael -- System Information: Debian Release: squeeze/sid APT prefers maverick-updates APT policy: (500, 'maverick-updates'), (500, 'maverick-security'), (500, 'maverick') Architecture: amd64 (x86_64) Kernel: Linux 2.6.35-22-generic (SMP w/4 CPU cores) Locale: LANG=en_DK.utf8, LC_CTYPE=en_DK.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -Nru apt-xapian-index-0.41/debian/changelog apt-xapian-index-0.41ubuntu1/debian/changelog diff -Nru apt-xapian-index-0.41/debian/control apt-xapian-index-0.41ubuntu1/debian/control --- apt-xapian-index-0.41/debian/control 2010-10-03 13:15:23.000000000 +0200 +++ apt-xapian-index-0.41ubuntu1/debian/control 2010-11-06 18:21:49.000000000 +0100 @@ -1,7 +1,8 @@ Source: apt-xapian-index Section: admin Priority: optional -Maintainer: Enrico Zini <enr...@debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com> +XSBC-Original-Maintainer: Enrico Zini <enr...@debian.org> Uploaders: David Paleino <da...@debian.org> Build-Depends: debhelper (>= 7.0.50~) Build-Depends-Indep: help2man, python, python-support, diff -Nru apt-xapian-index-0.41/debian/postinst apt-xapian-index-0.41ubuntu1/debian/postinst --- apt-xapian-index-0.41/debian/postinst 2010-05-24 18:28:41.000000000 +0200 +++ apt-xapian-index-0.41ubuntu1/debian/postinst 2010-11-06 18:21:49.000000000 +0100 @@ -2,20 +2,30 @@ #DEBHELPER# +if [ -x /usr/bin/ionice ]; then + IONICE="/usr/bin/ionice -c3" +else + IONICE="" +fi + case "$1" in configure) # Just checking the main directory with -d should prevent the indexing # to be started while an indexing is already going on, as the first # thing that update-apt-xapian-index does is to create the directory if # it is missing - if [ ! -d /var/lib/apt-xapian-index ] + # + # we also full-regenerate the index on upgrades from older versions + # because the weekly --update cron job will not use new plugins for + # already indexed packages + if [ ! -d /var/lib/apt-xapian-index ] || dpkg --compare-versions "$2" lt-nl "0.39" then if [ ! -x /usr/sbin/policy-rc.d ] || /usr/sbin/policy-rc.d apt-xapian-index start then echo "apt-xapian-index: Building new index in background..." # Ensure that we can use our module. See #537376 update-python-modules -p - nice /usr/sbin/update-apt-xapian-index --quiet & + $IONICE nice /usr/sbin/update-apt-xapian-index --force --quiet & fi fi ;;