mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
fix check versions
This commit is contained in:
parent
074badcfd6
commit
540f04340d
1 changed files with 5 additions and 9 deletions
|
@ -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
|
||||
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()
|
||||
|
|
Loading…
Add table
Reference in a new issue