devtools: Fix cleanup of temporary database (closes #1908656)
The stored database path for clean up was not absolute.
We now make the ``db-name`` absolute at database manade initialization. before
storing the name for cleanup.
--- a/devtools/__init__.py Tue Sep 06 15:16:06 2011 +0200
+++ b/devtools/__init__.py Tue Sep 06 15:29:05 2011 +0200
@@ -672,8 +672,9 @@
if 'global-db-name' not in self.system_source:
self.system_source['global-db-name'] = self.system_source['db-name']
process_db = self.system_source['db-name'] + str(os.getpid())
- self.__TMPDB.add(process_db)
self.system_source['db-name'] = process_db
+ process_db = self.absolute_dbfile() # update db-name to absolute path
+ self.__TMPDB.add(process_db)
@staticmethod
def _cleanup_database(dbfile):
@@ -694,7 +695,6 @@
self.config.sources()['system']['db-name'] = dbfile
return dbfile
-
def process_cache_entry(self, directory, dbname, db_id, entry):
return entry.get('sqlite')