Package: apt-xapian-index Severity: wishlist Tags: patch User: [EMAIL PROTECTED] Usertags: origin-ubuntu hardy ubuntu-patch
Hi, attached is a small patch (requires python-apt 0.7.6) that forces the cache building in memory. This works around a possible race condition with libapt when the pkgcache.bin is re-generated in a unsafe way (that is a different bug in libapt :/ Cheers, Michael
diff -Nru apt-xapian-index-0.9/update-apt-xapian-index apt-xapian-index-0.9ubuntu1/update-apt-xapian-index --- apt-xapian-index-0.9/update-apt-xapian-index 2008-06-20 03:52:21.000000000 -0500 +++ apt-xapian-index-0.9ubuntu1/update-apt-xapian-index 2008-06-20 16:47:14.000000000 -0500 @@ -127,7 +127,9 @@ #db.begin_transaction(False) # Iterate all Debian packages - cache = apt.Cache() + + # force apt to not write a pkgcache.bin + cache = apt.Cache(memonly=True) count = len(cache) for idx, pkg in enumerate(cache): # Print progress @@ -164,7 +166,9 @@ #db.begin_transaction(False) # Iterate all Debian packages - cache = apt.Cache() + + # force apt to not write a pkgcache.bin + cache = apt.Cache(memonly=True) count = len(cache) for idx, pkg in enumerate(records): # Print progress