Package was not been removed from db

If installed package version is greater than repository package, previous package is
not removed from db while downgrading.

A serious bug. Thanks Onur for reporting this. :)
This commit is contained in:
Faik Uygur
2008-02-05 12:20:03 +00:00
parent ae3aab75ba
commit 840cb9eef9
+2 -2
View File
@@ -230,7 +230,7 @@ class Install(AtomicOperation):
self.operation = UPGRADE self.operation = UPGRADE
# is this a downgrade? confirm this action. # is this a downgrade? confirm this action.
if self.ask_reinstall and (not self.operation == UPGRADE): if not self.operation == UPGRADE:
if pisi.version.Version(pkg.version) < pisi.version.Version(iversion): if pisi.version.Version(pkg.version) < pisi.version.Version(iversion):
#x = _('Downgrade to old upstream version?') #x = _('Downgrade to old upstream version?')
x = None x = None
@@ -238,7 +238,7 @@ class Install(AtomicOperation):
x = _('Downgrade to old distribution release?') x = _('Downgrade to old distribution release?')
else: else:
x = _('Downgrade to old distribution build?') x = _('Downgrade to old distribution build?')
if x and not ctx.ui.confirm(x): if self.ask_reinstall and x and not ctx.ui.confirm(x):
raise Error(_('Package downgrade declined')) raise Error(_('Package downgrade declined'))
self.operation = DOWNGRADE self.operation = DOWNGRADE