From 42d02e55e495fbe455082409ddf976904fd0777c Mon Sep 17 00:00:00 2001 From: k4z4n0v4 <46030560+k4z4n0v4@users.noreply.github.com> Date: Mon, 1 Apr 2024 16:07:33 +0400 Subject: [PATCH] Make refresh() for pacman_cli a no-op --- vmupdate/agent/source/pacman/pacman_cli.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vmupdate/agent/source/pacman/pacman_cli.py b/vmupdate/agent/source/pacman/pacman_cli.py index c1f73ee..b124e68 100644 --- a/vmupdate/agent/source/pacman/pacman_cli.py +++ b/vmupdate/agent/source/pacman/pacman_cli.py @@ -19,7 +19,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, # USA. -from typing import List,Dict +from typing import List, Dict from source.common.package_manager import PackageManager from source.common.process_result import ProcessResult @@ -34,10 +34,13 @@ def refresh(self, hard_fail: bool) -> ProcessResult: """ Use package manager to refresh available packages. - :param hard_fail: raise error if some repo is unavailable + Note: Is a no-op in ArchLinux because upgrade takes care of it, and + having just sync could cause problems. + See: https://github.com/QubesOS/qubes-core-admin-linux/pull/139#pullrequestreview-1845574713 + :return: (exit_code, stdout, stderr) """ - cmd = [self.package_manager, "-Sy"] + cmd = ["true"] return self.run_cmd(cmd) def get_packages(self) -> Dict[str, List[str]]: