mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-13 20:01:48 +01:00
Fix remove deps from log
This commit is contained in:
parent
04b3eb72f4
commit
a026bc31d7
1 changed files with 5 additions and 4 deletions
|
@ -75,7 +75,7 @@ class RemovePackages(Configs):
|
|||
name: str = self.utils.split_package(package)['name']
|
||||
version: str = self.utils.split_package(package)['version']
|
||||
for pkg, deps in self.deps_log.items():
|
||||
if name in deps and pkg not in self.packages_for_remove:
|
||||
if name in deps and pkg not in self.packages + self.dependencies:
|
||||
self.found_dependent_packages[pkg] = version
|
||||
|
||||
if self.found_dependent_packages:
|
||||
|
@ -91,7 +91,7 @@ class RemovePackages(Configs):
|
|||
for dep in self.dependencies:
|
||||
installed: str = self.utils.is_package_installed(dep)
|
||||
if installed:
|
||||
self.packages_for_remove.extend(installed)
|
||||
self.packages_for_remove.append(installed)
|
||||
|
||||
def remove_packages(self) -> None:
|
||||
print(f'Started of removing total ({self.cyan}{len(self.packages_for_remove)}{self.endc}) packages:\n')
|
||||
|
@ -100,8 +100,9 @@ class RemovePackages(Configs):
|
|||
progress_message: str = f'{self.bold}{self.red}Removing{self.endc}'
|
||||
|
||||
self.multi_proc.process(command, package, progress_message)
|
||||
if package in self.deps_log.keys():
|
||||
self.deps_log.pop(package)
|
||||
name: str = self.utils.split_package(package)['name']
|
||||
if name in self.deps_log.keys():
|
||||
self.deps_log.pop(name)
|
||||
|
||||
self.deps_log_file.write_text(json.dumps(self.deps_log, indent=4))
|
||||
|
||||
|
|
Loading…
Reference in a new issue