[entropy.server] really make sure that db data is flushed to disk during Server._package_injector

This commit is contained in:
Fabio Erculiani
2010-08-31 17:41:51 +02:00
parent 3888fff5eb
commit fef265dab3

View File

@@ -4159,6 +4159,8 @@ class ServerRepositoryMixin:
# update revision for pkg now
dbconn.setRevision(idpackage, revision)
# make sure that info have been written to disk
dbconn.commitChanges()
# set trashed counters
trashing_counters = set()
@@ -4228,7 +4230,9 @@ class ServerRepositoryMixin:
except OSError:
shutil.move(package_file, destination_path)
# make sure that info have been written to disk, again
dbconn.commitChanges()
return idpackage, destination_path
# this function changes the final repository package filename