- fixed counters injection that caused entropy database to be out of sync with portage. To just solve this on your PC, run equo database counters

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1118 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
(no author)
2008-02-02 16:06:03 +00:00
parent ca55d97378
commit 3d298fd83e
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -1627,6 +1627,12 @@ class etpDatabase(TextInterface):
self.cursor.execute('UPDATE baseinfo SET slot = (?) WHERE idpackage = (?)', (slot,idpackage,))
self.commitChanges()
def insertCounter(self, idpackage, counter):
self.checkReadOnly()
self.cursor.execute('DELETE FROM counters WHERE counter = (?) OR idpackage = (?)', (counter,idpackage,))
self.cursor.execute('INSERT INTO counters VALUES (?,?)', (counter,idpackage,))
self.commitChanges()
def setCounter(self, idpackage, counter):
self.checkReadOnly()
try:
+1 -1
View File
@@ -2554,7 +2554,7 @@ class PackageInterface:
f.flush()
f.close()
# update counter inside clientDatabase
self.Entropy.clientDbconn.setCounter(newidpackage,counter)
self.Entropy.clientDbconn.insertCounter(newidpackage,counter)
else:
self.Entropy.updateProgress(
red("QA: ")+brown("cannot update Gentoo counter, destination %s does not exist." %