[Uludag-commits] r16984 - trunk/pisi/pisi

uludag-commits at pardus.org.tr uludag-commits at pardus.org.tr
5 Şub 2008 Sal 14:20:04 EET


Author: faik
Date: Tue Feb  5 14:20:03 2008
New Revision: 16984

Modified:
   trunk/pisi/pisi/atomicoperations.py
Log:
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. :)


Modified: trunk/pisi/pisi/atomicoperations.py
=================================================================
--- trunk/pisi/pisi/atomicoperations.py	(original)
+++ trunk/pisi/pisi/atomicoperations.py	Tue Feb  5 14:20:03 2008
@@ -230,7 +230,7 @@
                     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 @@
                         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
 


Uludag-commits mesaj listesiyle ilgili daha fazla bilgi