mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-26 09:58:31 +01:00
Fixed summary
This commit is contained in:
parent
34a49ac076
commit
888da294f2
1 changed files with 12 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
|||
import os
|
||||
import shutil
|
||||
from typing import Any
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
from slpkg.configs import Configs
|
||||
from slpkg.views.ascii import Ascii
|
||||
|
@ -214,10 +215,19 @@ class ViewMessage:
|
|||
install = upgrade = remove = build = 0
|
||||
|
||||
for sbo in slackbuilds:
|
||||
if not self.utils.is_installed(sbo):
|
||||
inst_ver = repo_ver = 0
|
||||
installed = self.utils.is_installed(sbo)
|
||||
if installed:
|
||||
inst_ver = self.utils.split_installed_pkg(installed)[1]
|
||||
repo_ver = SBoQueries(sbo).version()
|
||||
|
||||
if not installed:
|
||||
install += 1
|
||||
elif self.utils.is_installed(sbo) or self.utils.is_installed(sbo) and '--reinstall' in self.flags:
|
||||
elif installed and '--reinstall' in self.flags:
|
||||
upgrade += 1
|
||||
elif installed and LooseVersion(repo_ver) > LooseVersion(inst_ver) and '--reinstall' not in self.flags:
|
||||
upgrade += 1
|
||||
elif installed and option == 'remove':
|
||||
remove += 1
|
||||
else:
|
||||
build += 1
|
||||
|
|
Loading…
Reference in a new issue