Updated for update command

This commit is contained in:
Dimitris Zlatanidis 2023-05-05 22:21:00 +03:00
parent 3b6b21381c
commit a97a429918
3 changed files with 21 additions and 15 deletions

View file

@ -39,28 +39,29 @@ class CheckUpdates(Configs):
level=LoggingConfig.level)
def check(self) -> dict:
sbo_repository: dict = {
self.repos.sbo_repo_name: self.sbo_repository,
self.repos.ponce_repo_name: self.ponce_repository
}
if self.option_for_repository:
sbo_repository: dict = {
self.repos.sbo_repo_name: self.sbo_repository,
self.repos.ponce_repo_name: self.ponce_repository
}
if self.is_binary:
self.binary_repository(self.repository)
else:
sbo_repository[self.repository]()
return self.compare
for repo in list(self.repos.repositories.keys())[2:]:
if self.repos.repositories[repo][0]:
self.binary_repository(repo)
if self.repos.ponce_repo:
self.ponce_repository()
else:
self.sbo_repository()
if self.repos.sbo_repo:
self.sbo_repository()
if self.repos.ponce_repo:
self.ponce_repository()
for repo in list(self.repos.repositories.keys())[2:]:
if self.repos.repositories[repo][0]:
self.binary_repository(repo)
return self.compare

View file

@ -211,6 +211,7 @@ class Repositories:
default_repository: str = repos_config['DEFAULT_REPOSITORY']
sbo_repo: str = repos_config['SBO_REPO']
sbo_repo_name: str = repos_config['SBO_REPO_NAME']
sbo_repo_local = repos_config['SBO_REPO_LOCAL']
sbo_repo_mirror = repos_config['SBO_REPO_MIRROR']

View file

@ -50,6 +50,10 @@ class UpdateRepository(Configs):
def update_the_repositories(self) -> None:
if not any(list(self.repos_for_update.values())):
self.view.question()
for repo in self.repos_for_update:
self.repos_for_update[repo] = True
raise SystemExit(self.repos_for_update)
else:
print()