Entropy/ServerInterface:

- backup database before shrinking to avoid slow re-indexing


git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1907 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
lxnay
2008-05-02 14:49:48 +00:00
parent 4baebf3abd
commit a786f2d121
+2 -2
View File
@@ -14533,7 +14533,7 @@ class ServerMirrorsInterface:
)
self.sync_database_treeupdates(repo)
self.close_server_databases()
self.Entropy.close_server_databases()
# backup current database to avoid re-indexing
old_dbpath = self.Entropy.get_local_database_file(repo)
@@ -14594,7 +14594,7 @@ class ServerMirrorsInterface:
# copy db back
if copy_back and os.path.isfile(backup_dbpath):
self.close_server_databases()
self.Entropy.close_server_databases()
further_backup_dbpath = old_dbpath+".security_backup"
if os.path.isfile(further_backup_dbpath):
os.remove(further_backup_dbpath)