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:
view.install_packages(self.slackbuilds, self.dependencies)
else:
view.build_packages(self.install_order)
view.build_packages(self.slackbuilds, self.dependencies)
del self.dependencies # no more needed

View file

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