Fixed for skipping

This commit is contained in:
Dimitris Zlatanidis 2023-03-27 10:45:11 +03:00
parent 063c4be101
commit 7d65112cb5
2 changed files with 12 additions and 12 deletions

View file

@ -93,20 +93,19 @@ class Packages(Configs):
slack_command: str = self.reinstall
message: str = f'{self.cyan}Installing{self.endc}'
print()
for package in self.binary_packages:
self.process_message: str = f"package '{package}' to build"
self.process_message: str = f"package '{package}' to install"
command: str = f'{slack_command} {self.tmp_slpkg}/{package}'
self.multi_process(command, package, message)
def skip_installed_package(self, package) -> bool:
""" Skip installed package when the option --skip-installed is applied. """
if (self.utils.is_option(self.flag_skip_installed, self.flags) and
self.utils.is_package_installed(package)):
print(f"slpkg: package '{self.cyan}{package}{self.endc}' skipped by the user.")
return True
elif self.utils.is_package_installed(package) and not self.utils.is_option(self.flag_reinstall, self.flags):
print(f"slpkg: package '{self.cyan}{package}{self.endc}' skipped installed.")
if (self.utils.is_package_installed(package) and not self.utils.is_option(self.flag_reinstall, self.flags) or
self.utils.is_option(self.flag_skip_installed, self.flags)):
version: str = BinQueries(package).version()
self.view_message.view_skipping_packages(package, version)
return True
def multi_process(self, command: str, filename: str, message: str) -> None:

View file

@ -168,13 +168,14 @@ class Slackbuilds(Configs):
sources_urls += SBoQueries(sbo).sources()
# Download the sources.
down_urls = Downloader(self.build_path, sources_urls, self.flags)
down_urls.download()
if sources:
down_urls = Downloader(self.build_path, sources_urls, self.flags)
down_urls.download()
print() # New line here.
print() # New line here.
self.move_sources(sources)
self.checksum_downloads()
self.move_sources(sources)
self.checksum_downloads()
def move_sources(self, sources: dict) -> None:
""" Move the sources into the folders for build. """