Updated for messages

This commit is contained in:
Dimitris Zlatanidis 2023-05-18 22:52:45 +03:00
parent ec776b9d34
commit 5268d373fb
3 changed files with 12 additions and 7 deletions

View file

@ -123,7 +123,8 @@ class Packages(Configs):
self.download_the_binary_packages(package_urls)
def download_the_binary_packages(self, package_urls: list) -> None:
print(f'Started to download total ({self.cyan}{len(package_urls)}{self.endc}) packages:\n')
if package_urls:
print(f'Started to download total ({self.cyan}{len(package_urls)}{self.endc}) packages:\n')
if package_urls:
down = Downloader(self.tmp_slpkg, package_urls, self.flags)
down.download()
@ -152,7 +153,8 @@ class Packages(Configs):
self.check_md5.md5sum(self.tmp_slpkg, package, pkg_checksum)
def install_packages(self) -> None:
print(f'Started the processing of ({self.cyan}{len(self.binary_packages)}{self.endc}) packages:\n')
if self.binary_packages:
print(f'Started the processing of ({self.cyan}{len(self.binary_packages)}{self.endc}) packages:\n')
for package in self.binary_packages:
command: str = f'{self.slackware_command} {self.tmp_slpkg}/{package}'
self.multi_proc.process(command, package, self.progress_message)

View file

@ -85,6 +85,7 @@ class DownloadOnly(Configs):
print(f"{self.byellow}Copying{self.endc}: {repo_path_package} -> {Path(self.download_path, name)}")
def download_the_sources(self) -> None:
print(f'\nStarted to download total ({self.cyan}{len(self.urls)}{self.endc}) sources:\n')
down = Downloader(self.download_path, self.urls, self.flags)
down.download()
if self.urls:
print(f'\nStarted to download total ({self.cyan}{len(self.urls)}{self.endc}) sources:\n')
down = Downloader(self.download_path, self.urls, self.flags)
down.download()

View file

@ -170,7 +170,8 @@ class Slackbuilds(Configs):
self.sources[sbo] = self.data[sbo]['download'].split()
def download_the_sources(self) -> None:
print(f'Started to download total ({self.cyan}{len(self.sources)}{self.endc}) sources:\n')
if self.sources:
print(f'Started to download total ({self.cyan}{len(self.sources)}{self.endc}) sources:\n')
if self.sources:
for package, sbo_sources in self.sources.items():
down_urls = Downloader(Path(self.build_path, package), sbo_sources, self.flags)
@ -194,7 +195,8 @@ class Slackbuilds(Configs):
self.check_md5.md5sum(path, source, checksum)
def build_and_install_the_slackbuilds(self) -> None:
print(f'Started the processing of ({self.cyan}{len(self.install_order)}{self.endc}) packages:\n')
if self.install_order:
print(f'Started the processing of ({self.cyan}{len(self.install_order)}{self.endc}) packages:\n')
for sbo in self.install_order:
if self.continue_build_or_install(sbo):
self.patch_slackbuild_tag(sbo)