fix check versions

This commit is contained in:
Dimitris Zlatanidis 2015-06-03 17:18:01 +03:00
parent 074badcfd6
commit 540f04340d

View file

@ -23,6 +23,7 @@
import sys
from distutils.version import LooseVersion
from slpkg.messages import Msg
from slpkg.toolbar import status
@ -57,16 +58,11 @@ def pkg_upgrade(repo, skip):
for name in data[0]:
if name: # this tips because some pkg_name is empty
repo_pkg = split_package(name[:-4])
if (((repo_pkg[0] == inst_pkg[0] and
repo_pkg[1] > inst_pkg[1] and
repo_pkg[3] > inst_pkg[3]) or
(repo_pkg[0] == inst_pkg[0] and
repo_pkg[1] > inst_pkg[1] and
repo_pkg[3] == inst_pkg[3])) and
inst_pkg[0] not in BlackList().packages() and
if (repo_pkg[0] == inst_pkg[0] and
LooseVersion(repo_pkg[1]) > LooseVersion(inst_pkg[1]) and
repo_pkg[3] >= inst_pkg[3] and
inst_pkg[0] not in BlackList().packages() and
inst_pkg[0] not in skip):
print repo_pkg[1], inst_pkg[1]
pkgs_for_upgrade.append('{0}-{1}'.format(repo_pkg[0],
repo_pkg[1]))
Msg().done()