diff --git a/ChangeLog.txt b/ChangeLog.txt index fbbeda04..211075dd 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,10 +1,13 @@ ## slpkg - ChangeLog -### 5.0.0 - 15/03/2024 +### 5.0.0 - 16/03/2024 - Updated: * Remove SQLAlchemy dependency * Remove help command, instead use manpage +- Bugfixes: + * Double view message when update repositories + ### 4.9.8 - 14/02/2024 - Added: * python urllib3 settings to the config file (slpkg.toml) diff --git a/slpkg/check_updates.py b/slpkg/check_updates.py index 65b78371..ab26f4f8 100644 --- a/slpkg/check_updates.py +++ b/slpkg/check_updates.py @@ -42,6 +42,7 @@ class CheckUpdates(Configs): else: self.check_updates_for_repositories() + self.view_messages(self.compare) return self.compare def check_updates_for_repositories(self) -> None: @@ -103,10 +104,6 @@ class CheckUpdates(Configs): # https://urllib3.readthedocs.io/en/stable/advanced-usage.html#socks-proxies self.http = SOCKSProxyManager(f'{self.proxy_address}', headers=self.proxy_default_headers) - def check_for_updates(self) -> None: - self.check_the_repositories() - self.view_messages(self.compare) - def view_messages(self, compare: dict) -> None: print() repo_for_update: list = [] @@ -115,8 +112,8 @@ class CheckUpdates(Configs): repo_for_update.append(repo) if repo_for_update: - print(f"\n{self.endc}There are new updates available for the " - f"repositories: \n") + print(f"\n{self.bgreen}There are new updates available for the " + f"repositories:{self.endc}\n") for repo in repo_for_update: repo_length: int = max(len(name) for name in repo_for_update) print(f'> {self.bgreen}{repo:<{repo_length}}{self.endc} Last Updated: ' @@ -128,7 +125,7 @@ class CheckUpdates(Configs): message: str = 'Checking for news, please wait...' # Starting multiprocessing - process_1 = Process(target=self.check_for_updates) + process_1 = Process(target=self.check_the_repositories) process_2 = Process(target=self.progress.progress_bar, args=(message,)) process_1.start() diff --git a/slpkg/update_repositories.py b/slpkg/update_repositories.py index 194e0eec..2366f1fc 100644 --- a/slpkg/update_repositories.py +++ b/slpkg/update_repositories.py @@ -651,8 +651,6 @@ class UpdateRepositories(Configs): def check_for_updates(self, queue) -> dict: compare: dict = self.check_updates.check_the_repositories() - self.check_updates.view_messages(compare) - return queue.put(compare) def repositories(self) -> None: