Kaydet (Commit) 2f51731d authored tarafından Eray Özkural's avatar Eray Özkural

* version and release are Version's

üst 7b54f2ef
......@@ -33,6 +33,7 @@ from pisi.metadata import MetaData
from pisi.files import Files
from pisi.uri import URI
import pisi.ui
from pisi.version import Version
#import conflicts
class Error(pisi.Error):
......@@ -195,10 +196,10 @@ class Install(AtomicOperation):
upgrade = False
# is this an upgrade?
# determine and report the kind of upgrade: version, release, build
if pkg.version > iversion:
if Version(pkg.version) > Version(iversion):
ctx.ui.info(_('Upgrading to new upstream version'))
upgrade = True
elif pkg.release > irelease:
elif Version(pkg.release) > Version(irelease):
ctx.ui.info(_('Upgrading to new distribution release'))
upgrade = True
elif ((not ignore_build) and ibuild and pkg.build
......@@ -209,9 +210,9 @@ class Install(AtomicOperation):
# is this a downgrade? confirm this action.
if self.ask_reinstall and (not upgrade):
if pkg.version < iversion:
if Version(pkg.version) < Version(iversion):
x = _('Downgrade to old upstream version?')
elif pkg.release < irelease:
elif Version(pkg.release) < Version(irelease):
x = _('Downgrade to old distribution release?')
else:
x = _('Downgrade to old distribution build?')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment