Update for check updates

This commit is contained in:
Dimitris Zlatanidis 2023-03-20 20:53:34 +02:00
parent 73ca183dfe
commit b8d8b01e1c
2 changed files with 14 additions and 5 deletions

View file

@ -33,21 +33,27 @@ class CheckUpdates(Configs):
self.local_chg_txt = None
self.repo_chg_txt = None
def check(self) -> None:
def check(self) -> bool:
""" Checks the ChangeLogs and returns True or False. """
# Ponce repository settings.
compare: bool = False
if self.utils.is_option(self.flag_binary, self.flags):
if self.repos.gnome_repo:
pass
self.local_chg_txt: Path = Path(self.repos.gnome_repo_path, self.repos.gnome_repo_chglog_pkg_txt)
self.repo_chg_txt: str = f'{self.repos.gnome_repo_url}{self.repos.gnome_repo_chglog_pkg_txt}'
compare: bool = self.compare_dates()
else:
if self.repos.ponce_repo:
self.local_chg_txt: Path = Path(self.repos.ponce_repo_path, self.repos.ponce_repo_chglog_txt)
self.repo_chg_txt: str = f'{self.repos.ponce_repo_url}{self.repos.ponce_repo_chglog_txt}'
self.compare_dates()
compare: bool = self.compare_dates()
else:
self.local_chg_txt: Path = Path(self.repos.sbo_repo_path, self.repos.sbo_repo_chglog_txt)
self.repo_chg_txt: str = f'{self.repos.sbo_repo_url}{self.repos.sbo_repo_chglog_txt}'
self.compare_dates()
compare: bool = self.compare_dates()
return compare
def compare_dates(self):
local_date: int = 0

View file

@ -152,7 +152,10 @@ class Argparse(Configs):
self.flag_parallel,
self.flag_short_parallel,
],
'check-updates': [],
'check-updates': [
self.flag_binary,
self.flag_short_binary
],
'configs': [],
'clean-logs': [
self.flag_yes,