Removed unused

This commit is contained in:
Dimitris Zlatanidis 2023-04-23 21:16:50 +03:00
parent d46721b43e
commit 806bfb2b78

View file

@ -36,13 +36,11 @@ class UpdateRepository(Configs):
self.utils = Utilities() self.utils = Utilities()
self.color = self.colour() self.color = self.colour()
self.data = InstallData() self.data = InstallData()
self.check_updates = CheckUpdates( self.check_updates = CheckUpdates(
self.flags, self.repo self.flags, self.repo
) )
if not self.repo:
self.repo = self.repos.sbo_enabled_repo_name
self.repos_for_update: dict = {} self.repos_for_update: dict = {}
self.bold: str = self.color['bold'] self.bold: str = self.color['bold']
self.green: str = self.color['green'] self.green: str = self.color['green']
@ -51,7 +49,9 @@ class UpdateRepository(Configs):
self.bgreen: str = f'{self.bold}{self.green}' self.bgreen: str = f'{self.bold}{self.green}'
self.bred: str = f'{self.bold}{self.red}' self.bred: str = f'{self.bold}{self.red}'
self.endc: str = self.color['endc'] self.endc: str = self.color['endc']
self.flag_generate: list = ['-G', '--generate-only']
self.option_for_generate: bool = self.utils.is_option(
['-G', '--generate-only'], self.flags)
self.option_for_binaries: bool = self.utils.is_option( self.option_for_binaries: bool = self.utils.is_option(
['-B', '--bin-repo='], self.flags) ['-B', '--bin-repo='], self.flags)
@ -566,8 +566,7 @@ class UpdateRepository(Configs):
""" Update the slackbuild repositories. """ """ Update the slackbuild repositories. """
if self.repos.ponce_repo: if self.repos.ponce_repo:
if (not self.utils.is_option(self.flag_generate, self.flags) or if not self.option_for_generate or not self.repos.ponce_repo_mirror[0].startswith('file'):
not self.repos.ponce_repo_mirror[0].startswith('file')):
print(f"Downloading the '{self.green}{self.repos.ponce_repo_name}" print(f"Downloading the '{self.green}{self.repos.ponce_repo_name}"
f"{self.endc}' repository, please wait...\n") f"{self.endc}' repository, please wait...\n")
self.make_dirs(self.repos.gnome_repo_name) self.make_dirs(self.repos.gnome_repo_name)
@ -613,20 +612,18 @@ class UpdateRepository(Configs):
def check(self, queue) -> None: def check(self, queue) -> None:
compare = self.check_updates.check() compare = self.check_updates.check()
is_update: dict = {}
print() print()
for repo, comp in compare.items(): for repo, comp in compare.items():
if comp: if comp:
print(f"\n{self.endc}There are new updates available for the " print(f"\n{self.endc}There are new updates available for the "
f"'{self.bgreen}{repo}{self.endc}' repository!") f"'{self.bgreen}{repo}{self.endc}' repository!")
is_update[repo] = comp
if True not in compare.values(): if True not in compare.values():
print(f'\n{self.endc}{self.yellow}No changes in ChangeLog.txt between your ' print(f'\n{self.endc}{self.yellow}No changes in ChangeLog.txt between your '
f'last update and now.{self.endc}') f'last update and now.{self.endc}')
return queue.put(is_update) return queue.put(compare)
def repositories(self) -> None: def repositories(self) -> None:
queue = Queue() queue = Queue()