Added message for db loading

This commit is contained in:
Dimitris Zlatanidis 2023-05-25 22:56:33 +03:00
parent f502edc765
commit d9832c265d

View file

@ -3,6 +3,7 @@
from slpkg.configs import Configs from slpkg.configs import Configs
from slpkg.utilities import Utilities from slpkg.utilities import Utilities
from slpkg.views.asciibox import AsciiBox
from slpkg.sbos.queries import SBoQueries from slpkg.sbos.queries import SBoQueries
from slpkg.repositories import Repositories from slpkg.repositories import Repositories
from slpkg.binaries.queries import BinQueries from slpkg.binaries.queries import BinQueries
@ -18,6 +19,7 @@ class SearchPackage(Configs):
self.utils = Utilities() self.utils = Utilities()
self.repos = Repositories() self.repos = Repositories()
self.ascii = AsciiBox()
self.matching: int = 0 self.matching: int = 0
self.repo_data: dict = {} self.repo_data: dict = {}
@ -29,14 +31,17 @@ class SearchPackage(Configs):
('-m', '--no-case'), flags) ('-m', '--no-case'), flags)
def search(self) -> None: def search(self) -> None:
print(f'The list below shows the repo ' print('\rDatabase loading... ', end='')
f'packages that contains \'{", ".join([p for p in self.packages])}\':\n')
if self.repository == '*': if self.repository == '*':
self.search_to_all_repositories() self.search_to_all_repositories()
else: else:
self.search_to_the_repository() self.search_to_the_repository()
print(f'{self.yellow}{self.ascii.done}{self.endc}')
print(f'The list below shows the repo '
f'packages that contains \'{", ".join([p for p in self.packages])}\':\n')
self.summary_of_searching() self.summary_of_searching()
def search_to_all_repositories(self) -> None: def search_to_all_repositories(self) -> None: