diff --git a/ChangeLog.txt b/ChangeLog.txt index 96d5924c..9074aa20 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,10 @@ ## slpkg - ChangeLog +### 5.1.2 - 22/08/2024 + +- Fixed: + * Fixed for upgrade when new_packages method is enabled + ### 5.1.1 - 22/07/2024 - Added: diff --git a/slpkg/upgrade.py b/slpkg/upgrade.py index 93920290..0dafc0b7 100644 --- a/slpkg/upgrade.py +++ b/slpkg/upgrade.py @@ -32,7 +32,6 @@ class Upgrade(Configs): # pylint: disable=[R0902] self.sum_upgrade: int = 0 self.sum_removed: int = 0 self.sum_added: int = 0 - self.installed_names: list = [] self.installed_packages: list = [] self.kernel_ver: str = platform.uname()[2] @@ -64,10 +63,8 @@ class Upgrade(Configs): # pylint: disable=[R0902] extra_package: str = extra_repo[name]['package'] if extra_package[:-4] != package: self.installed_packages.append(Path(package)) - self.installed_names.append(name) else: self.installed_packages.append(Path(package)) - self.installed_names.append(name) else: repo_tag: str = self.repos.repositories[repository]['repo_tag'] self.installed_packages: list = list(self.log_packages.glob(f'*{repo_tag}')) @@ -92,7 +89,6 @@ class Upgrade(Configs): # pylint: disable=[R0902] if self.repository in self.repos.new_packages: for name in self.data.keys(): if not self.utils.is_package_installed(name): - # if name not in self.installed_names: yield name def is_package_upgradeable(self, installed: str) -> bool: # pylint: disable=[R0911] @@ -220,8 +216,7 @@ class Upgrade(Configs): # pylint: disable=[R0902] if repo in self.repos.new_packages: for name in data.keys(): - # if not self.utils.is_package_installed(name): - if name not in self.installed_names: + if not self.utils.is_package_installed(name): self.id += 1 self.sum_added += 1 repo_version: str = data[name]['version']