Package: apt-listchanges Version: 2.74 Tags: patch apt-listchanges should silently rebuild its save_seen database, if it fails to load or getting queried (e.g. because of a corrupted file or incompatibilities in the database library).
The bug has been reported and fixed in Ubuntu: https://bugs.launchpad.net/ubuntu/+source/apt-listchanges/+bug/139143 The patch to fix this is attached. Please apply or adopt it in future releases. Thank you.
--- apt-listchanges.py.orig 2007-05-11 23:45:42.000000000 +0200
+++ apt-listchanges.py 2007-09-29 01:30:16.386591806 +0200
@@ -81,7 +81,14 @@
status.makeindex('Package')
if config.save_seen:
- seen = anydbm.open(config.save_seen, 'c')
+ # Open DB. Test if we can read it, and recreate on failure
+ try:
+ seen = anydbm.open(config.save_seen, 'c')
+ bool = seen.has_key('foo')
+ except anydbm.error:
+ sys.stderr.write(_("Recreating database %s, because it failed to load.\n") % config.save_seen)
+ os.remove(config.save_seen)
+ seen = anydbm.open(config.save_seen, 'c')
# Will replace seen after changes have actually been seen
seen_new = {}
signature.asc
Description: This is a digitally signed message part.

