mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
Updated for self
This commit is contained in:
parent
cfb4d6ba45
commit
c9e871b4a6
1 changed files with 9 additions and 8 deletions
|
@ -20,6 +20,7 @@ class SearchPackage(Configs):
|
||||||
self.repos = Repositories()
|
self.repos = Repositories()
|
||||||
|
|
||||||
self.matching: int = 0
|
self.matching: int = 0
|
||||||
|
self.repo_data: dict = {}
|
||||||
self.data_dict: dict = {}
|
self.data_dict: dict = {}
|
||||||
|
|
||||||
self.is_binary: bool = self.utils.is_binary_repo(repository)
|
self.is_binary: bool = self.utils.is_binary_repo(repository)
|
||||||
|
@ -42,21 +43,21 @@ class SearchPackage(Configs):
|
||||||
for repo, item in self.repos.repositories.items():
|
for repo, item in self.repos.repositories.items():
|
||||||
if item['enable']: # Check if the repository is enabled
|
if item['enable']: # Check if the repository is enabled
|
||||||
if self.utils.is_binary_repo(repo):
|
if self.utils.is_binary_repo(repo):
|
||||||
data: dict = BinQueries(repo).repository_data()
|
self.repo_data: dict = BinQueries(repo).repository_data()
|
||||||
else:
|
else:
|
||||||
data: dict = SBoQueries(repo).repository_data()
|
self.repo_data: dict = SBoQueries(repo).repository_data()
|
||||||
self.search_for_the_packages(data, repo)
|
self.search_for_the_packages(repo)
|
||||||
|
|
||||||
def search_to_the_repository(self) -> None:
|
def search_to_the_repository(self) -> None:
|
||||||
if self.is_binary:
|
if self.is_binary:
|
||||||
data: dict = BinQueries(self.repository).repository_data()
|
self.repo_data: dict = BinQueries(self.repository).repository_data()
|
||||||
else:
|
else:
|
||||||
data: dict = SBoQueries(self.repository).repository_data()
|
self.repo_data: dict = SBoQueries(self.repository).repository_data()
|
||||||
self.search_for_the_packages(data, self.repository)
|
self.search_for_the_packages(self.repository)
|
||||||
|
|
||||||
def search_for_the_packages(self, data: dict, repo: str) -> None:
|
def search_for_the_packages(self, repo: str) -> None:
|
||||||
for package in self.packages:
|
for package in self.packages:
|
||||||
for name, data_pkg in data.items():
|
for name, data_pkg in self.repo_data.items():
|
||||||
|
|
||||||
if self.option_for_no_case:
|
if self.option_for_no_case:
|
||||||
package: str = package.lower()
|
package: str = package.lower()
|
||||||
|
|
Loading…
Reference in a new issue