Updated for build view

This commit is contained in:
Dimitris Zlatanidis 2022-06-18 19:42:58 +03:00
parent cd6995c3d5
commit bc7621fff9
2 changed files with 9 additions and 5 deletions

View file

@ -59,7 +59,7 @@ class Slackbuilds:
if self.install: if self.install:
view.install_packages(self.slackbuilds, self.dependencies) view.install_packages(self.slackbuilds, self.dependencies)
else: else:
view.build_packages(self.install_order) view.build_packages(self.slackbuilds, self.dependencies)
del self.dependencies # no more needed del self.dependencies # no more needed

View file

@ -12,14 +12,18 @@ class ViewMessage:
colors: str = Metadata.colour colors: str = Metadata.colour
utils: str = Utilities() utils: str = Utilities()
def build_packages(self, slackbuilds): def build_packages(self, slackbuilds: list, dependencies: list):
print('The following packages will be build:\n') print('The following packages will be build:\n')
color = self.colors()
for sbo in slackbuilds: for sbo in slackbuilds:
version = SBoQueries(sbo).version() version = SBoQueries(sbo).version()
print(f'[{color["GREEN"]} build {color["ENDC"]}] -> ' self._view_packages(sbo, version)
f'{sbo}-{version}')
if dependencies:
print('Dependencies:')
for sbo in dependencies:
version = SBoQueries(sbo).version()
self._view_packages(sbo, version)
def install_packages(self, slackbuilds: list, dependencies: list): def install_packages(self, slackbuilds: list, dependencies: list):
print('The following packages will be installed or upgraded:\n') print('The following packages will be installed or upgraded:\n')