The spurious output comes from the apt python package used by update-apt-xapian-index. I think that the attached patch should fix the annoyance (tested on version 0.22).

--- /usr/sbin/update-apt-xapian-index.orig	2010-01-11 11:37:06.509530574 +0100
+++ /usr/sbin/update-apt-xapian-index.reallyquiet	2010-01-11 11:37:34.872865710 +0100
@@ -337,7 +337,7 @@
     Update the index
     """
     db = xapian.WritableDatabase(pathname, xapian.DB_CREATE_OR_OPEN)
-    cache = apt.Cache(memonly=True)
+    cache = apt.Cache(memonly=True,progress=aptprogress)
     count = len(cache)
 
     unchanged, outdated, obsolete = compareCacheToDb(cache, db, progress)
@@ -384,7 +384,7 @@
     # Iterate all Debian packages
 
     # force apt to not write a pkgcache.bin
-    cache = apt.Cache(memonly=True)
+    cache = apt.Cache(memonly=True,progress=aptprogress)
     count = len(cache)
     for idx, pkg in enumerate(cache):
         if not pkg.candidate:
@@ -411,7 +411,7 @@
     # Iterate all Debian packages
 
     # force apt to not write a pkgcache.bin
-    cache = apt.Cache(memonly=True)
+    cache = apt.Cache(memonly=True,progress=aptprogress)
     count = len(cache)
     for idx, pkg in enumerate(records):
         # Print progress
@@ -582,16 +582,27 @@
 import socket, errno
 import cPickle as pickle
 
+class AptSilentProgress(apt.progress.text.OpProgress) :
+    def __init__(self): 
+        pass
+    def done(self):
+        pass
+    def update(self,percent):
+        pass
+
 #if options.quiet: print "quiet"
 #if options.verbose: print "verbose"
 #if options.force: print "force"
 
 # Instantiate the progress report
 if options.batch_mode:
+    aptprogress = None
     progress = BatchProgress()
 elif options.quiet:
+    aptprogress = AptSilentProgress()
     progress = SilentProgress()
 else:
+    aptprogress = None
     progress = Progress()
 
 if options.verbose:


Reply via email to