Updated summary method

This commit is contained in:
Dimitris Zlatanidis 2023-04-27 13:12:41 +03:00
parent 291a6122bc
commit ef2d07b31e

View file

@ -214,20 +214,19 @@ class ViewMessage(Configs):
install = upgrade = remove = size_comp = size_uncomp = size_rmv = 0
for pkg in packages:
installed: str = self.utils.is_package_installed(pkg)
if self.option_for_binaries:
size_comp += int(''.join(re.findall(r'\d+', self.data[pkg][4])))
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
if option != 'remove':
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:
install += 1
elif installed and self.option_for_reinstall: