mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
Updated summary method
This commit is contained in:
parent
291a6122bc
commit
ef2d07b31e
1 changed files with 4 additions and 5 deletions
|
@ -214,20 +214,19 @@ class ViewMessage(Configs):
|
||||||
install = upgrade = remove = size_comp = size_uncomp = size_rmv = 0
|
install = upgrade = remove = size_comp = size_uncomp = size_rmv = 0
|
||||||
|
|
||||||
for pkg in packages:
|
for pkg in packages:
|
||||||
|
installed: str = self.utils.is_package_installed(pkg)
|
||||||
|
|
||||||
if self.option_for_binaries:
|
if self.option_for_binaries:
|
||||||
size_comp += int(''.join(re.findall(r'\d+', self.data[pkg][4])))
|
size_comp += int(''.join(re.findall(r'\d+', self.data[pkg][4])))
|
||||||
size_uncomp += int(''.join(re.findall(r'\d+', self.data[pkg][5])))
|
size_uncomp += int(''.join(re.findall(r'\d+', self.data[pkg][5])))
|
||||||
|
|
||||||
|
if installed and option == 'remove':
|
||||||
|
size_rmv += Path(self.log_packages, installed).stat().st_size
|
||||||
|
|
||||||
upgradeable: bool = False
|
upgradeable: bool = False
|
||||||
if option != 'remove':
|
if option != 'remove':
|
||||||
upgradeable: bool = self.upgrade.is_package_upgradeable(pkg)
|
upgradeable: bool = self.upgrade.is_package_upgradeable(pkg)
|
||||||
|
|
||||||
installed: str = self.utils.is_package_installed(pkg)
|
|
||||||
|
|
||||||
if installed and option == 'remove':
|
|
||||||
size_rmv += Path(self.log_packages, installed).stat().st_size
|
|
||||||
|
|
||||||
if not installed:
|
if not installed:
|
||||||
install += 1
|
install += 1
|
||||||
elif installed and self.option_for_reinstall:
|
elif installed and self.option_for_reinstall:
|
||||||
|
|
Loading…
Add table
Reference in a new issue