* version and release are Version's
This commit is contained in:
@@ -33,6 +33,7 @@ from pisi.metadata import MetaData
|
|||||||
from pisi.files import Files
|
from pisi.files import Files
|
||||||
from pisi.uri import URI
|
from pisi.uri import URI
|
||||||
import pisi.ui
|
import pisi.ui
|
||||||
|
from pisi.version import Version
|
||||||
#import conflicts
|
#import conflicts
|
||||||
|
|
||||||
class Error(pisi.Error):
|
class Error(pisi.Error):
|
||||||
@@ -195,10 +196,10 @@ class Install(AtomicOperation):
|
|||||||
upgrade = False
|
upgrade = False
|
||||||
# is this an upgrade?
|
# is this an upgrade?
|
||||||
# determine and report the kind of upgrade: version, release, build
|
# 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'))
|
ctx.ui.info(_('Upgrading to new upstream version'))
|
||||||
upgrade = True
|
upgrade = True
|
||||||
elif pkg.release > irelease:
|
elif Version(pkg.release) > Version(irelease):
|
||||||
ctx.ui.info(_('Upgrading to new distribution release'))
|
ctx.ui.info(_('Upgrading to new distribution release'))
|
||||||
upgrade = True
|
upgrade = True
|
||||||
elif ((not ignore_build) and ibuild and pkg.build
|
elif ((not ignore_build) and ibuild and pkg.build
|
||||||
@@ -209,9 +210,9 @@ class Install(AtomicOperation):
|
|||||||
|
|
||||||
# is this a downgrade? confirm this action.
|
# is this a downgrade? confirm this action.
|
||||||
if self.ask_reinstall and (not upgrade):
|
if self.ask_reinstall and (not upgrade):
|
||||||
if pkg.version < iversion:
|
if Version(pkg.version) < Version(iversion):
|
||||||
x = _('Downgrade to old upstream version?')
|
x = _('Downgrade to old upstream version?')
|
||||||
elif pkg.release < irelease:
|
elif Version(pkg.release) < Version(irelease):
|
||||||
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?')
|
||||||
|
|||||||
Reference in New Issue
Block a user