- 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:
@@ -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:
|
||||
|
||||
@@ -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." %
|
||||
|
||||
Reference in New Issue
Block a user