Skip to content

Commit

Permalink
Make refresh() for pacman_cli a no-op
Browse files Browse the repository at this point in the history
  • Loading branch information
k4z4n0v4 committed Apr 1, 2024
1 parent 4cee32c commit 42d02e5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions vmupdate/agent/source/pacman/pacman_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]]:
Expand Down

0 comments on commit 42d02e5

Please sign in to comment.