From 840cb9eef981831e749a97d78d669101b68c368d Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Tue, 5 Feb 2008 12:20:03 +0000 Subject: [PATCH] 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. :) --- pisi/atomicoperations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pisi/atomicoperations.py b/pisi/atomicoperations.py index 6641187a..851e1196 100644 --- a/pisi/atomicoperations.py +++ b/pisi/atomicoperations.py @@ -230,7 +230,7 @@ class Install(AtomicOperation): self.operation = UPGRADE # 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): #x = _('Downgrade to old upstream version?') x = None @@ -238,7 +238,7 @@ class Install(AtomicOperation): x = _('Downgrade to old distribution release?') else: 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')) self.operation = DOWNGRADE