mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-26 09:58:31 +01:00
Fixed removed packages
This commit is contained in:
parent
302220e698
commit
f93aa83ced
1 changed files with 8 additions and 9 deletions
|
@ -35,6 +35,7 @@ class ViewMessage:
|
|||
self.bcyan = f'{self.bold}{self.cyan}'
|
||||
self.red = self.color['red']
|
||||
self.grey = self.color['grey']
|
||||
self.violet = self.color['violet']
|
||||
self.endc = self.color['endc']
|
||||
self.installed_packages = []
|
||||
self.columns, self.rows = shutil.get_terminal_size()
|
||||
|
@ -77,7 +78,7 @@ class ViewMessage:
|
|||
if mode == 'build':
|
||||
color = self.yellow
|
||||
if mode == 'upgrade':
|
||||
color = self.green
|
||||
color = self.violet
|
||||
|
||||
print(f'{self.bgreen}{self.vl} {self.bold}{color}{package}{self.endc}' + ' ' * (35 - len(package)) +
|
||||
f'{version}' + ' ' * ((self.columns - 37) - len(version) - 1) + f'{self.bgreen}{self.vl}{self.endc}')
|
||||
|
@ -141,7 +142,7 @@ class ViewMessage:
|
|||
|
||||
def remove_packages(self, packages: list) -> Any:
|
||||
""" View remove packages. """
|
||||
slackbuilds, dependencies, deps = [], [], []
|
||||
slackbuilds, dependencies = [], []
|
||||
for pkg in packages:
|
||||
slackbuilds.append(pkg)
|
||||
|
||||
|
@ -150,13 +151,9 @@ class ViewMessage:
|
|||
LogsDependencies.name == pkg).first()
|
||||
|
||||
if requires:
|
||||
deps.append(requires)
|
||||
dependencies += requires[0].split()
|
||||
|
||||
for i in range(0, len(deps)):
|
||||
for dep in deps[i][0].split():
|
||||
dependencies.append(dep)
|
||||
|
||||
if deps and '--resolve-off' not in self.flags:
|
||||
if dependencies and '--resolve-off' not in self.flags:
|
||||
dependencies = self.choose_dependencies_for_remove(dependencies)
|
||||
|
||||
self.draw_title_box('The following packages will be removed:', 'Remove Packages')
|
||||
|
@ -164,12 +161,14 @@ class ViewMessage:
|
|||
for pkg in slackbuilds:
|
||||
self._view_removed(pkg)
|
||||
|
||||
if deps and '--resolve-off' not in self.flags:
|
||||
if dependencies and '--resolve-off' not in self.flags:
|
||||
self.draw_middle_line()
|
||||
self.draw_dependency_line()
|
||||
|
||||
for pkg in dependencies:
|
||||
self._view_removed(pkg)
|
||||
else:
|
||||
dependencies = []
|
||||
|
||||
self.summary(slackbuilds, dependencies, option='remove')
|
||||
|
||||
|
|
Loading…
Reference in a new issue