Entropy/Repository Service:
- fix database handling when reloading the interface data git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1996 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
@@ -15502,7 +15502,8 @@ class RepositorySocketServerInterface(SocketHostInterface):
|
||||
if os.path.isfile(self.repositories[x]['download_lock']) and \
|
||||
not self.repositories[x]['locked']:
|
||||
self.repositories[x]['locked'] = True
|
||||
self.close_db(self.repositories[x]['dbpath'])
|
||||
mydbpath = os.path.join(self.repositories[x]['dbpath'],etpConst['etpdatabasefile'])
|
||||
self.close_db(mydbpath)
|
||||
do_lock.add(repository)
|
||||
mytxt = blue("%s.") % (_("database got locked. Locking services for it"),)
|
||||
self.updateProgress(
|
||||
@@ -15515,6 +15516,8 @@ class RepositorySocketServerInterface(SocketHostInterface):
|
||||
)
|
||||
elif not os.path.isfile(self.repositories[x]['download_lock']) and \
|
||||
self.repositories[x]['locked']:
|
||||
mydbpath = os.path.join(self.repositories[x]['dbpath'],etpConst['etpdatabasefile'])
|
||||
self.close_db(mydbpath)
|
||||
mytxt = blue("%s.") % (_("unlocking and indexing database"),)
|
||||
self.updateProgress(
|
||||
"[%s] %s" % (
|
||||
@@ -15525,7 +15528,6 @@ class RepositorySocketServerInterface(SocketHostInterface):
|
||||
type = "info"
|
||||
)
|
||||
# woohoo, got unlocked eventually
|
||||
mydbpath = os.path.join(self.repositories[x]['dbpath'],etpConst['etpdatabasefile'])
|
||||
mydb = self.open_db(mydbpath)
|
||||
mydb.createAllIndexes()
|
||||
mydb.commitChanges()
|
||||
@@ -17240,6 +17242,7 @@ class ServerMirrorsInterface:
|
||||
dbconn = self.Entropy.openServerDatabase(read_only = False, no_upload = True, repo = repo, indexing = False)
|
||||
dbconn.dropAllIndexes()
|
||||
dbconn.vacuum()
|
||||
dbconn.vacuum()
|
||||
dbconn.commitChanges()
|
||||
self.Entropy.close_server_database(dbconn)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user