diff --git a/libraries/entropy/db.py b/libraries/entropy/db.py index 6f242ff1b..a15a9d56c 100644 --- a/libraries/entropy/db.py +++ b/libraries/entropy/db.py @@ -3801,23 +3801,13 @@ class LocalRepository: dirs |= set(map(unicode, mystr.split())) return sorted(list(dirs)) - def switchBranch(self, idpackage, tobranch): - - key, slot = self.retrieveKeySlot(idpackage) - - # if there are entries already, remove idpackage directly - my_idpackage, result = self.atomMatch(key, matchSlot = slot, - matchBranches = (tobranch,)) - if my_idpackage != -1: return False - - # otherwise, update the old one (set the new branch) + def switchBranch(self, idpackage, tobranch): with self.__write_mutex: self.cursor.execute(""" UPDATE baseinfo SET branch = (?) WHERE idpackage = (?)""", (tobranch, idpackage,)) self.commitChanges() self.clearCache() - return True def databaseStructureUpdates(self):