mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-16 07:47:35 +01:00
Fixed for upgrade
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
524252b2c9
commit
841a81b7d0
2 changed files with 6 additions and 6 deletions
|
@ -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:
|
||||
|
|
|
@ -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']
|
||||
|
|
Loading…
Reference in a new issue